proteus  1.7.2
C/C++/Fortran libraries
cmeshTools.cpp
Go to the documentation of this file.
1 /* Generated by Cython 0.29.2 */
2 
3 #define PY_SSIZE_T_CLEAN
4 #include "Python.h"
5 #ifndef Py_PYTHON_H
6  #error Python headers needed to compile C extensions, please install development version of Python.
7 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
8  #error Cython requires Python 2.6+ or Python 3.3+.
9 #else
10 #define CYTHON_ABI "0_29_2"
11 #define CYTHON_HEX_VERSION 0x001D02F0
12 #define CYTHON_FUTURE_DIVISION 0
13 #include <stddef.h>
14 #ifndef offsetof
15  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
16 #endif
17 #if !defined(WIN32) && !defined(MS_WINDOWS)
18  #ifndef __stdcall
19  #define __stdcall
20  #endif
21  #ifndef __cdecl
22  #define __cdecl
23  #endif
24  #ifndef __fastcall
25  #define __fastcall
26  #endif
27 #endif
28 #ifndef DL_IMPORT
29  #define DL_IMPORT(t) t
30 #endif
31 #ifndef DL_EXPORT
32  #define DL_EXPORT(t) t
33 #endif
34 #define __PYX_COMMA ,
35 #ifndef HAVE_LONG_LONG
36  #if PY_VERSION_HEX >= 0x02070000
37  #define HAVE_LONG_LONG
38  #endif
39 #endif
40 #ifndef PY_LONG_LONG
41  #define PY_LONG_LONG LONG_LONG
42 #endif
43 #ifndef Py_HUGE_VAL
44  #define Py_HUGE_VAL HUGE_VAL
45 #endif
46 #ifdef PYPY_VERSION
47  #define CYTHON_COMPILING_IN_PYPY 1
48  #define CYTHON_COMPILING_IN_PYSTON 0
49  #define CYTHON_COMPILING_IN_CPYTHON 0
50  #undef CYTHON_USE_TYPE_SLOTS
51  #define CYTHON_USE_TYPE_SLOTS 0
52  #undef CYTHON_USE_PYTYPE_LOOKUP
53  #define CYTHON_USE_PYTYPE_LOOKUP 0
54  #if PY_VERSION_HEX < 0x03050000
55  #undef CYTHON_USE_ASYNC_SLOTS
56  #define CYTHON_USE_ASYNC_SLOTS 0
57  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
58  #define CYTHON_USE_ASYNC_SLOTS 1
59  #endif
60  #undef CYTHON_USE_PYLIST_INTERNALS
61  #define CYTHON_USE_PYLIST_INTERNALS 0
62  #undef CYTHON_USE_UNICODE_INTERNALS
63  #define CYTHON_USE_UNICODE_INTERNALS 0
64  #undef CYTHON_USE_UNICODE_WRITER
65  #define CYTHON_USE_UNICODE_WRITER 0
66  #undef CYTHON_USE_PYLONG_INTERNALS
67  #define CYTHON_USE_PYLONG_INTERNALS 0
68  #undef CYTHON_AVOID_BORROWED_REFS
69  #define CYTHON_AVOID_BORROWED_REFS 1
70  #undef CYTHON_ASSUME_SAFE_MACROS
71  #define CYTHON_ASSUME_SAFE_MACROS 0
72  #undef CYTHON_UNPACK_METHODS
73  #define CYTHON_UNPACK_METHODS 0
74  #undef CYTHON_FAST_THREAD_STATE
75  #define CYTHON_FAST_THREAD_STATE 0
76  #undef CYTHON_FAST_PYCALL
77  #define CYTHON_FAST_PYCALL 0
78  #undef CYTHON_PEP489_MULTI_PHASE_INIT
79  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
80  #undef CYTHON_USE_TP_FINALIZE
81  #define CYTHON_USE_TP_FINALIZE 0
82  #undef CYTHON_USE_DICT_VERSIONS
83  #define CYTHON_USE_DICT_VERSIONS 0
84  #undef CYTHON_USE_EXC_INFO_STACK
85  #define CYTHON_USE_EXC_INFO_STACK 0
86 #elif defined(PYSTON_VERSION)
87  #define CYTHON_COMPILING_IN_PYPY 0
88  #define CYTHON_COMPILING_IN_PYSTON 1
89  #define CYTHON_COMPILING_IN_CPYTHON 0
90  #ifndef CYTHON_USE_TYPE_SLOTS
91  #define CYTHON_USE_TYPE_SLOTS 1
92  #endif
93  #undef CYTHON_USE_PYTYPE_LOOKUP
94  #define CYTHON_USE_PYTYPE_LOOKUP 0
95  #undef CYTHON_USE_ASYNC_SLOTS
96  #define CYTHON_USE_ASYNC_SLOTS 0
97  #undef CYTHON_USE_PYLIST_INTERNALS
98  #define CYTHON_USE_PYLIST_INTERNALS 0
99  #ifndef CYTHON_USE_UNICODE_INTERNALS
100  #define CYTHON_USE_UNICODE_INTERNALS 1
101  #endif
102  #undef CYTHON_USE_UNICODE_WRITER
103  #define CYTHON_USE_UNICODE_WRITER 0
104  #undef CYTHON_USE_PYLONG_INTERNALS
105  #define CYTHON_USE_PYLONG_INTERNALS 0
106  #ifndef CYTHON_AVOID_BORROWED_REFS
107  #define CYTHON_AVOID_BORROWED_REFS 0
108  #endif
109  #ifndef CYTHON_ASSUME_SAFE_MACROS
110  #define CYTHON_ASSUME_SAFE_MACROS 1
111  #endif
112  #ifndef CYTHON_UNPACK_METHODS
113  #define CYTHON_UNPACK_METHODS 1
114  #endif
115  #undef CYTHON_FAST_THREAD_STATE
116  #define CYTHON_FAST_THREAD_STATE 0
117  #undef CYTHON_FAST_PYCALL
118  #define CYTHON_FAST_PYCALL 0
119  #undef CYTHON_PEP489_MULTI_PHASE_INIT
120  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
121  #undef CYTHON_USE_TP_FINALIZE
122  #define CYTHON_USE_TP_FINALIZE 0
123  #undef CYTHON_USE_DICT_VERSIONS
124  #define CYTHON_USE_DICT_VERSIONS 0
125  #undef CYTHON_USE_EXC_INFO_STACK
126  #define CYTHON_USE_EXC_INFO_STACK 0
127 #else
128  #define CYTHON_COMPILING_IN_PYPY 0
129  #define CYTHON_COMPILING_IN_PYSTON 0
130  #define CYTHON_COMPILING_IN_CPYTHON 1
131  #ifndef CYTHON_USE_TYPE_SLOTS
132  #define CYTHON_USE_TYPE_SLOTS 1
133  #endif
134  #if PY_VERSION_HEX < 0x02070000
135  #undef CYTHON_USE_PYTYPE_LOOKUP
136  #define CYTHON_USE_PYTYPE_LOOKUP 0
137  #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
138  #define CYTHON_USE_PYTYPE_LOOKUP 1
139  #endif
140  #if PY_MAJOR_VERSION < 3
141  #undef CYTHON_USE_ASYNC_SLOTS
142  #define CYTHON_USE_ASYNC_SLOTS 0
143  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
144  #define CYTHON_USE_ASYNC_SLOTS 1
145  #endif
146  #if PY_VERSION_HEX < 0x02070000
147  #undef CYTHON_USE_PYLONG_INTERNALS
148  #define CYTHON_USE_PYLONG_INTERNALS 0
149  #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
150  #define CYTHON_USE_PYLONG_INTERNALS 1
151  #endif
152  #ifndef CYTHON_USE_PYLIST_INTERNALS
153  #define CYTHON_USE_PYLIST_INTERNALS 1
154  #endif
155  #ifndef CYTHON_USE_UNICODE_INTERNALS
156  #define CYTHON_USE_UNICODE_INTERNALS 1
157  #endif
158  #if PY_VERSION_HEX < 0x030300F0
159  #undef CYTHON_USE_UNICODE_WRITER
160  #define CYTHON_USE_UNICODE_WRITER 0
161  #elif !defined(CYTHON_USE_UNICODE_WRITER)
162  #define CYTHON_USE_UNICODE_WRITER 1
163  #endif
164  #ifndef CYTHON_AVOID_BORROWED_REFS
165  #define CYTHON_AVOID_BORROWED_REFS 0
166  #endif
167  #ifndef CYTHON_ASSUME_SAFE_MACROS
168  #define CYTHON_ASSUME_SAFE_MACROS 1
169  #endif
170  #ifndef CYTHON_UNPACK_METHODS
171  #define CYTHON_UNPACK_METHODS 1
172  #endif
173  #ifndef CYTHON_FAST_THREAD_STATE
174  #define CYTHON_FAST_THREAD_STATE 1
175  #endif
176  #ifndef CYTHON_FAST_PYCALL
177  #define CYTHON_FAST_PYCALL 1
178  #endif
179  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
180  #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000)
181  #endif
182  #ifndef CYTHON_USE_TP_FINALIZE
183  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
184  #endif
185  #ifndef CYTHON_USE_DICT_VERSIONS
186  #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1)
187  #endif
188  #ifndef CYTHON_USE_EXC_INFO_STACK
189  #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3)
190  #endif
191 #endif
192 #if !defined(CYTHON_FAST_PYCCALL)
193 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
194 #endif
195 #if CYTHON_USE_PYLONG_INTERNALS
196  #include "longintrepr.h"
197  #undef SHIFT
198  #undef BASE
199  #undef MASK
200  #ifdef SIZEOF_VOID_P
201  enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
202  #endif
203 #endif
204 #ifndef __has_attribute
205  #define __has_attribute(x) 0
206 #endif
207 #ifndef __has_cpp_attribute
208  #define __has_cpp_attribute(x) 0
209 #endif
210 #ifndef CYTHON_RESTRICT
211  #if defined(__GNUC__)
212  #define CYTHON_RESTRICT __restrict__
213  #elif defined(_MSC_VER) && _MSC_VER >= 1400
214  #define CYTHON_RESTRICT __restrict
215  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
216  #define CYTHON_RESTRICT restrict
217  #else
218  #define CYTHON_RESTRICT
219  #endif
220 #endif
221 #ifndef CYTHON_UNUSED
222 # if defined(__GNUC__)
223 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
224 # define CYTHON_UNUSED __attribute__ ((__unused__))
225 # else
226 # define CYTHON_UNUSED
227 # endif
228 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
229 # define CYTHON_UNUSED __attribute__ ((__unused__))
230 # else
231 # define CYTHON_UNUSED
232 # endif
233 #endif
234 #ifndef CYTHON_MAYBE_UNUSED_VAR
235 # if defined(__cplusplus)
236  template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
237 # else
238 # define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
239 # endif
240 #endif
241 #ifndef CYTHON_NCP_UNUSED
242 # if CYTHON_COMPILING_IN_CPYTHON
243 # define CYTHON_NCP_UNUSED
244 # else
245 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
246 # endif
247 #endif
248 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
249 #ifdef _MSC_VER
250  #ifndef _MSC_STDINT_H_
251  #if _MSC_VER < 1300
252  typedef unsigned char uint8_t;
253  typedef unsigned int uint32_t;
254  #else
255  typedef unsigned __int8 uint8_t;
256  typedef unsigned __int32 uint32_t;
257  #endif
258  #endif
259 #else
260  #include <stdint.h>
261 #endif
262 #ifndef CYTHON_FALLTHROUGH
263  #if defined(__cplusplus) && __cplusplus >= 201103L
264  #if __has_cpp_attribute(fallthrough)
265  #define CYTHON_FALLTHROUGH [[fallthrough]]
266  #elif __has_cpp_attribute(clang::fallthrough)
267  #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
268  #elif __has_cpp_attribute(gnu::fallthrough)
269  #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
270  #endif
271  #endif
272  #ifndef CYTHON_FALLTHROUGH
273  #if __has_attribute(fallthrough)
274  #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
275  #else
276  #define CYTHON_FALLTHROUGH
277  #endif
278  #endif
279  #if defined(__clang__ ) && defined(__apple_build_version__)
280  #if __apple_build_version__ < 7000000
281  #undef CYTHON_FALLTHROUGH
282  #define CYTHON_FALLTHROUGH
283  #endif
284  #endif
285 #endif
286 
287 #ifndef __cplusplus
288  #error "Cython files generated with the C++ option must be compiled with a C++ compiler."
289 #endif
290 #ifndef CYTHON_INLINE
291  #if defined(__clang__)
292  #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
293  #else
294  #define CYTHON_INLINE inline
295  #endif
296 #endif
297 template<typename T>
298 void __Pyx_call_destructor(T& x) {
299  x.~T();
300 }
301 template<typename T>
302 class __Pyx_FakeReference {
303  public:
304  __Pyx_FakeReference() : ptr(NULL) { }
305  __Pyx_FakeReference(const T& ref) : ptr(const_cast<T*>(&ref)) { }
306  T *operator->() { return ptr; }
307  T *operator&() { return ptr; }
308  operator T&() { return *ptr; }
309  template<typename U> bool operator ==(U other) { return *ptr == other; }
310  template<typename U> bool operator !=(U other) { return *ptr != other; }
311  private:
312  T *ptr;
313 };
314 
315 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
316  #define Py_OptimizeFlag 0
317 #endif
318 #define __PYX_BUILD_PY_SSIZE_T "n"
319 #define CYTHON_FORMAT_SSIZE_T "z"
320 #if PY_MAJOR_VERSION < 3
321  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
322  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
323  PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
324  #define __Pyx_DefaultClassType PyClass_Type
325 #else
326  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
327  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
328  PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
329  #define __Pyx_DefaultClassType PyType_Type
330 #endif
331 #ifndef Py_TPFLAGS_CHECKTYPES
332  #define Py_TPFLAGS_CHECKTYPES 0
333 #endif
334 #ifndef Py_TPFLAGS_HAVE_INDEX
335  #define Py_TPFLAGS_HAVE_INDEX 0
336 #endif
337 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
338  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
339 #endif
340 #ifndef Py_TPFLAGS_HAVE_FINALIZE
341  #define Py_TPFLAGS_HAVE_FINALIZE 0
342 #endif
343 #ifndef METH_STACKLESS
344  #define METH_STACKLESS 0
345 #endif
346 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
347  #ifndef METH_FASTCALL
348  #define METH_FASTCALL 0x80
349  #endif
350  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
351  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
352  Py_ssize_t nargs, PyObject *kwnames);
353 #else
354  #define __Pyx_PyCFunctionFast _PyCFunctionFast
355  #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
356 #endif
357 #if CYTHON_FAST_PYCCALL
358 #define __Pyx_PyFastCFunction_Check(func)\
359  ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)))))
360 #else
361 #define __Pyx_PyFastCFunction_Check(func) 0
362 #endif
363 #if CYTHON_USE_DICT_VERSIONS
364 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
365 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
366  (version_var) = __PYX_GET_DICT_VERSION(dict);\
367  (cache_var) = (value);
368 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
369  static PY_UINT64_T __pyx_dict_version = 0;\
370  static PyObject *__pyx_dict_cached_value = NULL;\
371  if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
372  (VAR) = __pyx_dict_cached_value;\
373  } else {\
374  (VAR) = __pyx_dict_cached_value = (LOOKUP);\
375  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
376  }\
377  }
378 #else
379 #define __PYX_GET_DICT_VERSION(dict) (0)
380 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
381 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
382 #endif
383 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
384  #define PyObject_Malloc(s) PyMem_Malloc(s)
385  #define PyObject_Free(p) PyMem_Free(p)
386  #define PyObject_Realloc(p) PyMem_Realloc(p)
387 #endif
388 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1
389  #define PyMem_RawMalloc(n) PyMem_Malloc(n)
390  #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n)
391  #define PyMem_RawFree(p) PyMem_Free(p)
392 #endif
393 #if CYTHON_COMPILING_IN_PYSTON
394  #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
395  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
396 #else
397  #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
398  #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
399 #endif
400 #if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
401  #define __Pyx_PyThreadState_Current PyThreadState_GET()
402 #elif PY_VERSION_HEX >= 0x03060000
403  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
404 #elif PY_VERSION_HEX >= 0x03000000
405  #define __Pyx_PyThreadState_Current PyThreadState_GET()
406 #else
407  #define __Pyx_PyThreadState_Current _PyThreadState_Current
408 #endif
409 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
410 #include "pythread.h"
411 #define Py_tss_NEEDS_INIT 0
412 typedef int Py_tss_t;
413 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
414  *key = PyThread_create_key();
415  return 0; // PyThread_create_key reports success always
416 }
417 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
418  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
419  *key = Py_tss_NEEDS_INIT;
420  return key;
421 }
422 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
423  PyObject_Free(key);
424 }
425 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
426  return *key != Py_tss_NEEDS_INIT;
427 }
428 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
429  PyThread_delete_key(*key);
430  *key = Py_tss_NEEDS_INIT;
431 }
432 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
433  return PyThread_set_key_value(*key, value);
434 }
435 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
436  return PyThread_get_key_value(*key);
437 }
438 #endif // TSS (Thread Specific Storage) API
439 #if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
440 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
441 #else
442 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
443 #endif
444 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
445  #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
446  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
447 #else
448  #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
449  #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
450 #endif
451 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS
452 #define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
453 #else
454 #define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name)
455 #endif
456 #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
457  #define CYTHON_PEP393_ENABLED 1
458  #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
459  0 : _PyUnicode_Ready((PyObject *)(op)))
460  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
461  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
462  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
463  #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
464  #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
465  #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
466  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
467  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
468 #else
469  #define CYTHON_PEP393_ENABLED 0
470  #define PyUnicode_1BYTE_KIND 1
471  #define PyUnicode_2BYTE_KIND 2
472  #define PyUnicode_4BYTE_KIND 4
473  #define __Pyx_PyUnicode_READY(op) (0)
474  #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
475  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
476  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
477  #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
478  #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
479  #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
480  #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
481  #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
482 #endif
483 #if CYTHON_COMPILING_IN_PYPY
484  #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
485  #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
486 #else
487  #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
488  #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
489  PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
490 #endif
491 #if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
492  #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
493 #endif
494 #if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
495  #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
496 #endif
497 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
498  #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
499 #endif
500 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
501 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
502 #if PY_MAJOR_VERSION >= 3
503  #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
504 #else
505  #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
506 #endif
507 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
508  #define PyObject_ASCII(o) PyObject_Repr(o)
509 #endif
510 #if PY_MAJOR_VERSION >= 3
511  #define PyBaseString_Type PyUnicode_Type
512  #define PyStringObject PyUnicodeObject
513  #define PyString_Type PyUnicode_Type
514  #define PyString_Check PyUnicode_Check
515  #define PyString_CheckExact PyUnicode_CheckExact
516  #define PyObject_Unicode PyObject_Str
517 #endif
518 #if PY_MAJOR_VERSION >= 3
519  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
520  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
521 #else
522  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
523  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
524 #endif
525 #ifndef PySet_CheckExact
526  #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
527 #endif
528 #if CYTHON_ASSUME_SAFE_MACROS
529  #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
530 #else
531  #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
532 #endif
533 #if PY_MAJOR_VERSION >= 3
534  #define PyIntObject PyLongObject
535  #define PyInt_Type PyLong_Type
536  #define PyInt_Check(op) PyLong_Check(op)
537  #define PyInt_CheckExact(op) PyLong_CheckExact(op)
538  #define PyInt_FromString PyLong_FromString
539  #define PyInt_FromUnicode PyLong_FromUnicode
540  #define PyInt_FromLong PyLong_FromLong
541  #define PyInt_FromSize_t PyLong_FromSize_t
542  #define PyInt_FromSsize_t PyLong_FromSsize_t
543  #define PyInt_AsLong PyLong_AsLong
544  #define PyInt_AS_LONG PyLong_AS_LONG
545  #define PyInt_AsSsize_t PyLong_AsSsize_t
546  #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
547  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
548  #define PyNumber_Int PyNumber_Long
549 #endif
550 #if PY_MAJOR_VERSION >= 3
551  #define PyBoolObject PyLongObject
552 #endif
553 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
554  #ifndef PyUnicode_InternFromString
555  #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
556  #endif
557 #endif
558 #if PY_VERSION_HEX < 0x030200A4
559  typedef long Py_hash_t;
560  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
561  #define __Pyx_PyInt_AsHash_t PyInt_AsLong
562 #else
563  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
564  #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
565 #endif
566 #if PY_MAJOR_VERSION >= 3
567  #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func))
568 #else
569  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
570 #endif
571 #if CYTHON_USE_ASYNC_SLOTS
572  #if PY_VERSION_HEX >= 0x030500B1
573  #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
574  #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
575  #else
576  #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
577  #endif
578 #else
579  #define __Pyx_PyType_AsAsync(obj) NULL
580 #endif
581 #ifndef __Pyx_PyAsyncMethodsStruct
582  typedef struct {
583  unaryfunc am_await;
584  unaryfunc am_aiter;
585  unaryfunc am_anext;
586  } __Pyx_PyAsyncMethodsStruct;
587 #endif
588 
589 #if defined(WIN32) || defined(MS_WINDOWS)
590  #define _USE_MATH_DEFINES
591 #endif
592 #include <math.h>
593 #ifdef NAN
594 #define __PYX_NAN() ((float) NAN)
595 #else
596 static CYTHON_INLINE float __PYX_NAN() {
597  float value;
598  memset(&value, 0xFF, sizeof(value));
599  return value;
600 }
601 #endif
602 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
603 #define __Pyx_truncl trunc
604 #else
605 #define __Pyx_truncl truncl
606 #endif
607 
608 
609 #define __PYX_ERR(f_index, lineno, Ln_error) \
610 { \
611  __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
612 }
613 
614 #ifndef __PYX_EXTERN_C
615  #ifdef __cplusplus
616  #define __PYX_EXTERN_C extern "C"
617  #else
618  #define __PYX_EXTERN_C extern
619  #endif
620 #endif
621 
622 #define __PYX_HAVE__cmeshTools
623 #define __PYX_HAVE_API__cmeshTools
624 /* Early includes */
625 #include <string.h>
626 #include <stdio.h>
627 #include "numpy/arrayobject.h"
628 #include "numpy/ufuncobject.h"
629 #include "mesh.h"
630 #include "pythread.h"
631 #include <stdlib.h>
632 #include "pystate.h"
633 #ifdef _OPENMP
634 #include <omp.h>
635 #endif /* _OPENMP */
636 
637 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
638 #define CYTHON_WITHOUT_ASSERTIONS
639 #endif
640 
641 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
642  const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
643 
644 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
645 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
646 #define __PYX_DEFAULT_STRING_ENCODING ""
647 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
648 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
649 #define __Pyx_uchar_cast(c) ((unsigned char)c)
650 #define __Pyx_long_cast(x) ((long)x)
651 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
652  (sizeof(type) < sizeof(Py_ssize_t)) ||\
653  (sizeof(type) > sizeof(Py_ssize_t) &&\
654  likely(v < (type)PY_SSIZE_T_MAX ||\
655  v == (type)PY_SSIZE_T_MAX) &&\
656  (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
657  v == (type)PY_SSIZE_T_MIN))) ||\
658  (sizeof(type) == sizeof(Py_ssize_t) &&\
659  (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
660  v == (type)PY_SSIZE_T_MAX))) )
661 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
662  return (size_t) i < (size_t) limit;
663 }
664 #if defined (__cplusplus) && __cplusplus >= 201103L
665  #include <cstdlib>
666  #define __Pyx_sst_abs(value) std::abs(value)
667 #elif SIZEOF_INT >= SIZEOF_SIZE_T
668  #define __Pyx_sst_abs(value) abs(value)
669 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
670  #define __Pyx_sst_abs(value) labs(value)
671 #elif defined (_MSC_VER)
672  #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
673 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
674  #define __Pyx_sst_abs(value) llabs(value)
675 #elif defined (__GNUC__)
676  #define __Pyx_sst_abs(value) __builtin_llabs(value)
677 #else
678  #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
679 #endif
680 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
681 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
682 #define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
683 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
684 #define __Pyx_PyBytes_FromString PyBytes_FromString
685 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
686 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
687 #if PY_MAJOR_VERSION < 3
688  #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
689  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
690 #else
691  #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
692  #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
693 #endif
694 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
695 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
696 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
697 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
698 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
699 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
700 #define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
701 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
702 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
703 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
704 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
705 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
706 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
707 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
708 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
709 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
710 static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
711  const Py_UNICODE *u_end = u;
712  while (*u_end++) ;
713  return (size_t)(u_end - u - 1);
714 }
715 #define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
716 #define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
717 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
718 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
719 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
720 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
721 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
722 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
723 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
724 #define __Pyx_PySequence_Tuple(obj)\
725  (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
726 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
727 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
728 #if CYTHON_ASSUME_SAFE_MACROS
729 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
730 #else
731 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
732 #endif
733 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
734 #if PY_MAJOR_VERSION >= 3
735 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
736 #else
737 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
738 #endif
739 #define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
740 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
741 static int __Pyx_sys_getdefaultencoding_not_ascii;
742 static int __Pyx_init_sys_getdefaultencoding_params(void) {
743  PyObject* sys;
744  PyObject* default_encoding = NULL;
745  PyObject* ascii_chars_u = NULL;
746  PyObject* ascii_chars_b = NULL;
747  const char* default_encoding_c;
748  sys = PyImport_ImportModule("sys");
749  if (!sys) goto bad;
750  default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
751  Py_DECREF(sys);
752  if (!default_encoding) goto bad;
753  default_encoding_c = PyBytes_AsString(default_encoding);
754  if (!default_encoding_c) goto bad;
755  if (strcmp(default_encoding_c, "ascii") == 0) {
756  __Pyx_sys_getdefaultencoding_not_ascii = 0;
757  } else {
758  char ascii_chars[128];
759  int c;
760  for (c = 0; c < 128; c++) {
761  ascii_chars[c] = c;
762  }
763  __Pyx_sys_getdefaultencoding_not_ascii = 1;
764  ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
765  if (!ascii_chars_u) goto bad;
766  ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
767  if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
768  PyErr_Format(
769  PyExc_ValueError,
770  "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
771  default_encoding_c);
772  goto bad;
773  }
774  Py_DECREF(ascii_chars_u);
775  Py_DECREF(ascii_chars_b);
776  }
777  Py_DECREF(default_encoding);
778  return 0;
779 bad:
780  Py_XDECREF(default_encoding);
781  Py_XDECREF(ascii_chars_u);
782  Py_XDECREF(ascii_chars_b);
783  return -1;
784 }
785 #endif
786 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
787 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
788 #else
789 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
790 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
791 static char* __PYX_DEFAULT_STRING_ENCODING;
792 static int __Pyx_init_sys_getdefaultencoding_params(void) {
793  PyObject* sys;
794  PyObject* default_encoding = NULL;
795  char* default_encoding_c;
796  sys = PyImport_ImportModule("sys");
797  if (!sys) goto bad;
798  default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
799  Py_DECREF(sys);
800  if (!default_encoding) goto bad;
801  default_encoding_c = PyBytes_AsString(default_encoding);
802  if (!default_encoding_c) goto bad;
803  __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
804  if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
805  strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
806  Py_DECREF(default_encoding);
807  return 0;
808 bad:
809  Py_XDECREF(default_encoding);
810  return -1;
811 }
812 #endif
813 #endif
814 
815 
816 /* Test for GCC > 2.95 */
817 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
818  #define likely(x) __builtin_expect(!!(x), 1)
819  #define unlikely(x) __builtin_expect(!!(x), 0)
820 #else /* !__GNUC__ or GCC < 2.95 */
821  #define likely(x) (x)
822  #define unlikely(x) (x)
823 #endif /* __GNUC__ */
824 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
825 
826 static PyObject *__pyx_m = NULL;
827 static PyObject *__pyx_d;
828 static PyObject *__pyx_b;
829 static PyObject *__pyx_cython_runtime = NULL;
830 static PyObject *__pyx_empty_tuple;
831 static PyObject *__pyx_empty_bytes;
832 static PyObject *__pyx_empty_unicode;
833 static int __pyx_lineno;
834 static int __pyx_clineno = 0;
835 static const char * __pyx_cfilenm= __FILE__;
836 static const char *__pyx_filename;
837 
838 /* Header.proto */
839 #if !defined(CYTHON_CCOMPLEX)
840  #if defined(__cplusplus)
841  #define CYTHON_CCOMPLEX 1
842  #elif defined(_Complex_I)
843  #define CYTHON_CCOMPLEX 1
844  #else
845  #define CYTHON_CCOMPLEX 0
846  #endif
847 #endif
848 #if CYTHON_CCOMPLEX
849  #ifdef __cplusplus
850  #include <complex>
851  #else
852  #include <complex.h>
853  #endif
854 #endif
855 #if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__)
856  #undef _Complex_I
857  #define _Complex_I 1.0fj
858 #endif
859 
860 
861 static const char *__pyx_f[] = {
862  "stringsource",
863  "proteus/cmeshTools.pyx",
864  "proteus/cmeshTools.pxd",
865  "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd",
866  "linux/lib/python3.7/site-packages/Cython/Includes/cpython/type.pxd",
867 };
868 /* ForceInitThreads.proto */
869 #ifndef __PYX_FORCE_INIT_THREADS
870  #define __PYX_FORCE_INIT_THREADS 0
871 #endif
872 
873 /* NoFastGil.proto */
874 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
875 #define __Pyx_PyGILState_Release PyGILState_Release
876 #define __Pyx_FastGIL_Remember()
877 #define __Pyx_FastGIL_Forget()
878 #define __Pyx_FastGilFuncInit()
879 
880 /* BufferFormatStructs.proto */
881 #define IS_UNSIGNED(type) (((type) -1) > 0)
882 struct __Pyx_StructField_;
883 #define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0)
884 typedef struct {
885  const char* name;
886  struct __Pyx_StructField_* fields;
887  size_t size;
888  size_t arraysize[8];
889  int ndim;
890  char typegroup;
891  char is_unsigned;
892  int flags;
893 } __Pyx_TypeInfo;
894 typedef struct __Pyx_StructField_ {
895  __Pyx_TypeInfo* type;
896  const char* name;
897  size_t offset;
898 } __Pyx_StructField;
899 typedef struct {
900  __Pyx_StructField* field;
901  size_t parent_offset;
902 } __Pyx_BufFmt_StackElem;
903 typedef struct {
904  __Pyx_StructField root;
905  __Pyx_BufFmt_StackElem* head;
906  size_t fmt_offset;
907  size_t new_count, enc_count;
908  size_t struct_alignment;
909  int is_complex;
910  char enc_type;
911  char new_packmode;
912  char enc_packmode;
913  char is_valid_array;
914 } __Pyx_BufFmt_Context;
915 
916 /* Atomics.proto */
917 #include <pythread.h>
918 #ifndef CYTHON_ATOMICS
919  #define CYTHON_ATOMICS 1
920 #endif
921 #define __pyx_atomic_int_type int
922 #if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 ||\
923  (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) &&\
924  !defined(__i386__)
925  #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1)
926  #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1)
927  #ifdef __PYX_DEBUG_ATOMICS
928  #warning "Using GNU atomics"
929  #endif
930 #elif CYTHON_ATOMICS && defined(_MSC_VER) && 0
931  #include <Windows.h>
932  #undef __pyx_atomic_int_type
933  #define __pyx_atomic_int_type LONG
934  #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value)
935  #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value)
936  #ifdef __PYX_DEBUG_ATOMICS
937  #pragma message ("Using MSVC atomics")
938  #endif
939 #elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0
940  #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value)
941  #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value)
942  #ifdef __PYX_DEBUG_ATOMICS
943  #warning "Using Intel atomics"
944  #endif
945 #else
946  #undef CYTHON_ATOMICS
947  #define CYTHON_ATOMICS 0
948  #ifdef __PYX_DEBUG_ATOMICS
949  #warning "Not using atomics"
950  #endif
951 #endif
952 typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
953 #if CYTHON_ATOMICS
954  #define __pyx_add_acquisition_count(memview)\
955  __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
956  #define __pyx_sub_acquisition_count(memview)\
957  __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock)
958 #else
959  #define __pyx_add_acquisition_count(memview)\
960  __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
961  #define __pyx_sub_acquisition_count(memview)\
962  __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock)
963 #endif
964 
965 /* MemviewSliceStruct.proto */
966 struct __pyx_memoryview_obj;
967 typedef struct {
968  struct __pyx_memoryview_obj *memview;
969  char *data;
970  Py_ssize_t shape[8];
971  Py_ssize_t strides[8];
972  Py_ssize_t suboffsets[8];
973 } __Pyx_memviewslice;
974 #define __Pyx_MemoryView_Len(m) (m.shape[0])
975 
976 
977 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":776
978  * # in Cython to enable them only on the right systems.
979  *
980  * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<<
981  * ctypedef npy_int16 int16_t
982  * ctypedef npy_int32 int32_t
983  */
984 typedef npy_int8 __pyx_t_5numpy_int8_t;
985 
986 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":777
987  *
988  * ctypedef npy_int8 int8_t
989  * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<<
990  * ctypedef npy_int32 int32_t
991  * ctypedef npy_int64 int64_t
992  */
993 typedef npy_int16 __pyx_t_5numpy_int16_t;
994 
995 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":778
996  * ctypedef npy_int8 int8_t
997  * ctypedef npy_int16 int16_t
998  * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<<
999  * ctypedef npy_int64 int64_t
1000  * #ctypedef npy_int96 int96_t
1001  */
1002 typedef npy_int32 __pyx_t_5numpy_int32_t;
1003 
1004 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":779
1005  * ctypedef npy_int16 int16_t
1006  * ctypedef npy_int32 int32_t
1007  * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<<
1008  * #ctypedef npy_int96 int96_t
1009  * #ctypedef npy_int128 int128_t
1010  */
1011 typedef npy_int64 __pyx_t_5numpy_int64_t;
1012 
1013 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":783
1014  * #ctypedef npy_int128 int128_t
1015  *
1016  * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<<
1017  * ctypedef npy_uint16 uint16_t
1018  * ctypedef npy_uint32 uint32_t
1019  */
1020 typedef npy_uint8 __pyx_t_5numpy_uint8_t;
1021 
1022 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":784
1023  *
1024  * ctypedef npy_uint8 uint8_t
1025  * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<<
1026  * ctypedef npy_uint32 uint32_t
1027  * ctypedef npy_uint64 uint64_t
1028  */
1029 typedef npy_uint16 __pyx_t_5numpy_uint16_t;
1030 
1031 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":785
1032  * ctypedef npy_uint8 uint8_t
1033  * ctypedef npy_uint16 uint16_t
1034  * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<<
1035  * ctypedef npy_uint64 uint64_t
1036  * #ctypedef npy_uint96 uint96_t
1037  */
1038 typedef npy_uint32 __pyx_t_5numpy_uint32_t;
1039 
1040 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":786
1041  * ctypedef npy_uint16 uint16_t
1042  * ctypedef npy_uint32 uint32_t
1043  * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<<
1044  * #ctypedef npy_uint96 uint96_t
1045  * #ctypedef npy_uint128 uint128_t
1046  */
1047 typedef npy_uint64 __pyx_t_5numpy_uint64_t;
1048 
1049 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":790
1050  * #ctypedef npy_uint128 uint128_t
1051  *
1052  * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<<
1053  * ctypedef npy_float64 float64_t
1054  * #ctypedef npy_float80 float80_t
1055  */
1056 typedef npy_float32 __pyx_t_5numpy_float32_t;
1057 
1058 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":791
1059  *
1060  * ctypedef npy_float32 float32_t
1061  * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<<
1062  * #ctypedef npy_float80 float80_t
1063  * #ctypedef npy_float128 float128_t
1064  */
1065 typedef npy_float64 __pyx_t_5numpy_float64_t;
1066 
1067 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":800
1068  * # The int types are mapped a bit surprising --
1069  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1070  * ctypedef npy_long int_t # <<<<<<<<<<<<<<
1071  * ctypedef npy_longlong long_t
1072  * ctypedef npy_longlong longlong_t
1073  */
1074 typedef npy_long __pyx_t_5numpy_int_t;
1075 
1076 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":801
1077  * # numpy.int corresponds to 'l' and numpy.long to 'q'
1078  * ctypedef npy_long int_t
1079  * ctypedef npy_longlong long_t # <<<<<<<<<<<<<<
1080  * ctypedef npy_longlong longlong_t
1081  *
1082  */
1083 typedef npy_longlong __pyx_t_5numpy_long_t;
1084 
1085 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":802
1086  * ctypedef npy_long int_t
1087  * ctypedef npy_longlong long_t
1088  * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<<
1089  *
1090  * ctypedef npy_ulong uint_t
1091  */
1092 typedef npy_longlong __pyx_t_5numpy_longlong_t;
1093 
1094 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":804
1095  * ctypedef npy_longlong longlong_t
1096  *
1097  * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<<
1098  * ctypedef npy_ulonglong ulong_t
1099  * ctypedef npy_ulonglong ulonglong_t
1100  */
1101 typedef npy_ulong __pyx_t_5numpy_uint_t;
1102 
1103 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":805
1104  *
1105  * ctypedef npy_ulong uint_t
1106  * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<<
1107  * ctypedef npy_ulonglong ulonglong_t
1108  *
1109  */
1110 typedef npy_ulonglong __pyx_t_5numpy_ulong_t;
1111 
1112 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":806
1113  * ctypedef npy_ulong uint_t
1114  * ctypedef npy_ulonglong ulong_t
1115  * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<<
1116  *
1117  * ctypedef npy_intp intp_t
1118  */
1119 typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t;
1120 
1121 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":808
1122  * ctypedef npy_ulonglong ulonglong_t
1123  *
1124  * ctypedef npy_intp intp_t # <<<<<<<<<<<<<<
1125  * ctypedef npy_uintp uintp_t
1126  *
1127  */
1128 typedef npy_intp __pyx_t_5numpy_intp_t;
1129 
1130 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":809
1131  *
1132  * ctypedef npy_intp intp_t
1133  * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<<
1134  *
1135  * ctypedef npy_double float_t
1136  */
1137 typedef npy_uintp __pyx_t_5numpy_uintp_t;
1138 
1139 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":811
1140  * ctypedef npy_uintp uintp_t
1141  *
1142  * ctypedef npy_double float_t # <<<<<<<<<<<<<<
1143  * ctypedef npy_double double_t
1144  * ctypedef npy_longdouble longdouble_t
1145  */
1146 typedef npy_double __pyx_t_5numpy_float_t;
1147 
1148 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":812
1149  *
1150  * ctypedef npy_double float_t
1151  * ctypedef npy_double double_t # <<<<<<<<<<<<<<
1152  * ctypedef npy_longdouble longdouble_t
1153  *
1154  */
1155 typedef npy_double __pyx_t_5numpy_double_t;
1156 
1157 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":813
1158  * ctypedef npy_double float_t
1159  * ctypedef npy_double double_t
1160  * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<<
1161  *
1162  * ctypedef npy_cfloat cfloat_t
1163  */
1164 typedef npy_longdouble __pyx_t_5numpy_longdouble_t;
1165 /* Declarations.proto */
1166 #if CYTHON_CCOMPLEX
1167  #ifdef __cplusplus
1168  typedef ::std::complex< float > __pyx_t_float_complex;
1169  #else
1170  typedef float _Complex __pyx_t_float_complex;
1171  #endif
1172 #else
1173  typedef struct { float real, imag; } __pyx_t_float_complex;
1174 #endif
1175 static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float, float);
1176 
1177 /* Declarations.proto */
1178 #if CYTHON_CCOMPLEX
1179  #ifdef __cplusplus
1180  typedef ::std::complex< double > __pyx_t_double_complex;
1181  #else
1182  typedef double _Complex __pyx_t_double_complex;
1183  #endif
1184 #else
1185  typedef struct { double real, imag; } __pyx_t_double_complex;
1186 #endif
1187 static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double, double);
1188 
1189 
1190 /*--- Type declarations ---*/
1191 struct __pyx_obj_10cmeshTools_CMesh;
1192 struct __pyx_obj_10cmeshTools_CMultilevelMesh;
1193 struct __pyx_array_obj;
1194 struct __pyx_MemviewEnum_obj;
1195 struct __pyx_memoryview_obj;
1196 struct __pyx_memoryviewslice_obj;
1197 
1198 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":815
1199  * ctypedef npy_longdouble longdouble_t
1200  *
1201  * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<<
1202  * ctypedef npy_cdouble cdouble_t
1203  * ctypedef npy_clongdouble clongdouble_t
1204  */
1205 typedef npy_cfloat __pyx_t_5numpy_cfloat_t;
1206 
1207 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":816
1208  *
1209  * ctypedef npy_cfloat cfloat_t
1210  * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<<
1211  * ctypedef npy_clongdouble clongdouble_t
1212  *
1213  */
1214 typedef npy_cdouble __pyx_t_5numpy_cdouble_t;
1215 
1216 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":817
1217  * ctypedef npy_cfloat cfloat_t
1218  * ctypedef npy_cdouble cdouble_t
1219  * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<<
1220  *
1221  * ctypedef npy_cdouble complex_t
1222  */
1223 typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t;
1224 
1225 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":819
1226  * ctypedef npy_clongdouble clongdouble_t
1227  *
1228  * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<<
1229  *
1230  * cdef inline object PyArray_MultiIterNew1(a):
1231  */
1232 typedef npy_cdouble __pyx_t_5numpy_complex_t;
1233 
1234 /* "cmeshTools.pxd":5
1235  * cimport mesh as cppm
1236  *
1237  * cdef class CMesh: # <<<<<<<<<<<<<<
1238  * cdef cppm.Mesh mesh
1239  * cdef public:
1240  */
1241 struct __pyx_obj_10cmeshTools_CMesh {
1242  PyObject_HEAD
1243  struct Mesh mesh;
1244  int nElements_global;
1245  int nNodes_global;
1246  int nNodes_element;
1252  int max_nElements_node;
1253  int nEdges_global;
1255  PyArrayObject *elementNodesArray;
1256  PyArrayObject *nodeElementsArray;
1257  PyArrayObject *nodeElementOffsets;
1258  PyArrayObject *elementNeighborsArray;
1259  PyArrayObject *elementBoundariesArray;
1260  PyArrayObject *elementBoundaryNodesArray;
1261  PyArrayObject *elementBoundaryElementsArray;
1263  PyArrayObject *interiorElementBoundariesArray;
1264  PyArrayObject *exteriorElementBoundariesArray;
1265  PyArrayObject *edgeNodesArray;
1266  PyArrayObject *nodeStarArray;
1267  PyArrayObject *nodeStarOffsets;
1268  PyArrayObject *elementMaterialTypes;
1269  PyArrayObject *elementBoundaryMaterialTypes;
1270  PyArrayObject *nodeMaterialTypes;
1271  PyArrayObject *nodeArray;
1272  int nx;
1273  int ny;
1274  int nz;
1275  int px;
1276  int py;
1277  int pz;
1278  PyArrayObject *elementIJK;
1279  PyArrayObject *weights;
1280  PyArrayObject *U_KNOT;
1281  PyArrayObject *V_KNOT;
1282  PyArrayObject *W_KNOT;
1283  PyArrayObject *elementDiametersArray;
1284  PyArrayObject *elementInnerDiametersArray;
1285  PyArrayObject *elementBoundaryDiametersArray;
1286  PyArrayObject *elementBarycentersArray;
1287  PyArrayObject *elementBoundaryBarycentersArray;
1288  PyArrayObject *nodeDiametersArray;
1289  PyArrayObject *nodeSupportArray;
1290  double h;
1291  double hMin;
1292  double sigmaMax;
1293  double volume;
1294 };
1295 
1296 
1297 /* "cmeshTools.pyx":199
1298  * return CMeshnew
1299  *
1300  * cdef class CMultilevelMesh: # <<<<<<<<<<<<<<
1301  * cdef cppm.MultilevelMesh multilevelMesh
1302  * cdef public:
1303  */
1304 struct __pyx_obj_10cmeshTools_CMultilevelMesh {
1305  PyObject_HEAD
1306  struct MultilevelMesh multilevelMesh;
1307  int nLevels;
1308  PyObject *cmeshList;
1309  PyObject *elementParentsArrayList;
1310  PyObject *elementChildrenArrayList;
1311  PyObject *elementChildrenOffsetsList;
1312 };
1313 
1314 
1315 /* "View.MemoryView":105
1316  *
1317  * @cname("__pyx_array")
1318  * cdef class array: # <<<<<<<<<<<<<<
1319  *
1320  * cdef:
1321  */
1322 struct __pyx_array_obj {
1323  PyObject_HEAD
1324  struct __pyx_vtabstruct_array *__pyx_vtab;
1325  char *data;
1326  Py_ssize_t len;
1327  char *format;
1328  int ndim;
1329  Py_ssize_t *_shape;
1330  Py_ssize_t *_strides;
1331  Py_ssize_t itemsize;
1332  PyObject *mode;
1333  PyObject *_format;
1334  void (*callback_free_data)(void *);
1335  int free_data;
1336  int dtype_is_object;
1337 };
1338 
1339 
1340 /* "View.MemoryView":279
1341  *
1342  * @cname('__pyx_MemviewEnum')
1343  * cdef class Enum(object): # <<<<<<<<<<<<<<
1344  * cdef object name
1345  * def __init__(self, name):
1346  */
1347 struct __pyx_MemviewEnum_obj {
1348  PyObject_HEAD
1349  PyObject *name;
1350 };
1351 
1352 
1353 /* "View.MemoryView":330
1354  *
1355  * @cname('__pyx_memoryview')
1356  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1357  *
1358  * cdef object obj
1359  */
1360 struct __pyx_memoryview_obj {
1361  PyObject_HEAD
1362  struct __pyx_vtabstruct_memoryview *__pyx_vtab;
1363  PyObject *obj;
1364  PyObject *_size;
1365  PyObject *_array_interface;
1366  PyThread_type_lock lock;
1367  __pyx_atomic_int acquisition_count[2];
1368  __pyx_atomic_int *acquisition_count_aligned_p;
1369  Py_buffer view;
1370  int flags;
1371  int dtype_is_object;
1372  __Pyx_TypeInfo *typeinfo;
1373 };
1374 
1375 
1376 /* "View.MemoryView":961
1377  *
1378  * @cname('__pyx_memoryviewslice')
1379  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1380  * "Internal class for passing memoryview slices to Python"
1381  *
1382  */
1383 struct __pyx_memoryviewslice_obj {
1384  struct __pyx_memoryview_obj __pyx_base;
1385  __Pyx_memviewslice from_slice;
1386  PyObject *from_object;
1387  PyObject *(*to_object_func)(char *);
1388  int (*to_dtype_func)(char *, PyObject *);
1389 };
1390 
1391 
1392 
1393 /* "View.MemoryView":105
1394  *
1395  * @cname("__pyx_array")
1396  * cdef class array: # <<<<<<<<<<<<<<
1397  *
1398  * cdef:
1399  */
1400 
1401 struct __pyx_vtabstruct_array {
1402  PyObject *(*get_memview)(struct __pyx_array_obj *);
1403 };
1404 static struct __pyx_vtabstruct_array *__pyx_vtabptr_array;
1405 
1406 
1407 /* "View.MemoryView":330
1408  *
1409  * @cname('__pyx_memoryview')
1410  * cdef class memoryview(object): # <<<<<<<<<<<<<<
1411  *
1412  * cdef object obj
1413  */
1414 
1415 struct __pyx_vtabstruct_memoryview {
1416  char *(*get_item_pointer)(struct __pyx_memoryview_obj *, PyObject *);
1417  PyObject *(*is_slice)(struct __pyx_memoryview_obj *, PyObject *);
1418  PyObject *(*setitem_slice_assignment)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1419  PyObject *(*setitem_slice_assign_scalar)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *);
1420  PyObject *(*setitem_indexed)(struct __pyx_memoryview_obj *, PyObject *, PyObject *);
1421  PyObject *(*convert_item_to_object)(struct __pyx_memoryview_obj *, char *);
1422  PyObject *(*assign_item_from_object)(struct __pyx_memoryview_obj *, char *, PyObject *);
1423 };
1424 static struct __pyx_vtabstruct_memoryview *__pyx_vtabptr_memoryview;
1425 
1426 
1427 /* "View.MemoryView":961
1428  *
1429  * @cname('__pyx_memoryviewslice')
1430  * cdef class _memoryviewslice(memoryview): # <<<<<<<<<<<<<<
1431  * "Internal class for passing memoryview slices to Python"
1432  *
1433  */
1434 
1435 struct __pyx_vtabstruct__memoryviewslice {
1436  struct __pyx_vtabstruct_memoryview __pyx_base;
1437 };
1438 static struct __pyx_vtabstruct__memoryviewslice *__pyx_vtabptr__memoryviewslice;
1439 
1440 /* --- Runtime support code (head) --- */
1441 /* Refnanny.proto */
1442 #ifndef CYTHON_REFNANNY
1443  #define CYTHON_REFNANNY 0
1444 #endif
1445 #if CYTHON_REFNANNY
1446  typedef struct {
1447  void (*INCREF)(void*, PyObject*, int);
1448  void (*DECREF)(void*, PyObject*, int);
1449  void (*GOTREF)(void*, PyObject*, int);
1450  void (*GIVEREF)(void*, PyObject*, int);
1451  void* (*SetupContext)(const char*, int, const char*);
1452  void (*FinishContext)(void**);
1453  } __Pyx_RefNannyAPIStruct;
1454  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
1455  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
1456  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
1457 #ifdef WITH_THREAD
1458  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1459  if (acquire_gil) {\
1460  PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
1461  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1462  PyGILState_Release(__pyx_gilstate_save);\
1463  } else {\
1464  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
1465  }
1466 #else
1467  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
1468  __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
1469 #endif
1470  #define __Pyx_RefNannyFinishContext()\
1471  __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
1472  #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1473  #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1474  #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1475  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
1476  #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
1477  #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
1478  #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
1479  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
1480 #else
1481  #define __Pyx_RefNannyDeclarations
1482  #define __Pyx_RefNannySetupContext(name, acquire_gil)
1483  #define __Pyx_RefNannyFinishContext()
1484  #define __Pyx_INCREF(r) Py_INCREF(r)
1485  #define __Pyx_DECREF(r) Py_DECREF(r)
1486  #define __Pyx_GOTREF(r)
1487  #define __Pyx_GIVEREF(r)
1488  #define __Pyx_XINCREF(r) Py_XINCREF(r)
1489  #define __Pyx_XDECREF(r) Py_XDECREF(r)
1490  #define __Pyx_XGOTREF(r)
1491  #define __Pyx_XGIVEREF(r)
1492 #endif
1493 #define __Pyx_XDECREF_SET(r, v) do {\
1494  PyObject *tmp = (PyObject *) r;\
1495  r = v; __Pyx_XDECREF(tmp);\
1496  } while (0)
1497 #define __Pyx_DECREF_SET(r, v) do {\
1498  PyObject *tmp = (PyObject *) r;\
1499  r = v; __Pyx_DECREF(tmp);\
1500  } while (0)
1501 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
1502 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
1503 
1504 /* PyObjectGetAttrStr.proto */
1505 #if CYTHON_USE_TYPE_SLOTS
1506 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
1507 #else
1508 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
1509 #endif
1510 
1511 /* GetBuiltinName.proto */
1512 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
1513 
1514 /* RaiseArgTupleInvalid.proto */
1515 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
1516  Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
1517 
1518 /* KeywordStringCheck.proto */
1519 static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
1520 
1521 /* GetModuleGlobalName.proto */
1522 #if CYTHON_USE_DICT_VERSIONS
1523 #define __Pyx_GetModuleGlobalName(var, name) {\
1524  static PY_UINT64_T __pyx_dict_version = 0;\
1525  static PyObject *__pyx_dict_cached_value = NULL;\
1526  (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
1527  (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
1528  __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1529 }
1530 #define __Pyx_GetModuleGlobalNameUncached(var, name) {\
1531  PY_UINT64_T __pyx_dict_version;\
1532  PyObject *__pyx_dict_cached_value;\
1533  (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
1534 }
1535 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
1536 #else
1537 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1538 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
1539 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
1540 #endif
1541 
1542 /* PyCFunctionFastCall.proto */
1543 #if CYTHON_FAST_PYCCALL
1544 static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
1545 #else
1546 #define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
1547 #endif
1548 
1549 /* PyFunctionFastCall.proto */
1550 #if CYTHON_FAST_PYCALL
1551 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
1552  __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
1553 #if 1 || PY_VERSION_HEX < 0x030600B1
1554 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
1555 #else
1556 #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
1557 #endif
1558 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
1559  (sizeof(char [1 - 2*!(cond)]) - 1)
1560 #ifndef Py_MEMBER_SIZE
1561 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
1562 #endif
1563  static size_t __pyx_pyframe_localsplus_offset = 0;
1564  #include "frameobject.h"
1565  #define __Pxy_PyFrame_Initialize_Offsets()\
1566  ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
1567  (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
1568  #define __Pyx_PyFrame_GetLocalsplus(frame)\
1569  (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
1570 #endif
1571 
1572 /* PyObjectCall.proto */
1573 #if CYTHON_COMPILING_IN_CPYTHON
1574 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
1575 #else
1576 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
1577 #endif
1578 
1579 /* PyObjectCall2Args.proto */
1580 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
1581 
1582 /* PyObjectCallMethO.proto */
1583 #if CYTHON_COMPILING_IN_CPYTHON
1584 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
1585 #endif
1586 
1587 /* PyObjectCallOneArg.proto */
1588 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
1589 
1590 /* ExtTypeTest.proto */
1591 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
1592 
1593 /* PyThreadStateGet.proto */
1594 #if CYTHON_FAST_THREAD_STATE
1595 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
1596 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
1597 #define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
1598 #else
1599 #define __Pyx_PyThreadState_declare
1600 #define __Pyx_PyThreadState_assign
1601 #define __Pyx_PyErr_Occurred() PyErr_Occurred()
1602 #endif
1603 
1604 /* PyErrFetchRestore.proto */
1605 #if CYTHON_FAST_THREAD_STATE
1606 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
1607 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
1608 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
1609 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
1610 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
1611 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1612 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1613 #if CYTHON_COMPILING_IN_CPYTHON
1614 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
1615 #else
1616 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1617 #endif
1618 #else
1619 #define __Pyx_PyErr_Clear() PyErr_Clear()
1620 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
1621 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
1622 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
1623 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
1624 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
1625 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
1626 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
1627 #endif
1628 
1629 /* RaiseException.proto */
1630 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
1631 
1632 /* PyObjectCallNoArg.proto */
1633 #if CYTHON_COMPILING_IN_CPYTHON
1634 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
1635 #else
1636 #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
1637 #endif
1638 
1639 /* RaiseDoubleKeywords.proto */
1640 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
1641 
1642 /* ParseKeywords.proto */
1643 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
1644  PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
1645  const char* function_name);
1646 
1647 /* ArgTypeTest.proto */
1648 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
1649  ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 :\
1650  __Pyx__ArgTypeTest(obj, type, name, exact))
1651 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
1652 
1653 /* PyIntBinop.proto */
1654 #if !CYTHON_COMPILING_IN_PYPY
1655 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
1656 #else
1657 #define __Pyx_PyInt_SubtractObjC(op1, op2, intval, inplace)\
1658  (inplace ? PyNumber_InPlaceSubtract(op1, op2) : PyNumber_Subtract(op1, op2))
1659 #endif
1660 
1661 /* PyIntCompare.proto */
1662 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);
1663 
1664 /* WriteUnraisableException.proto */
1665 static void __Pyx_WriteUnraisable(const char *name, int clineno,
1666  int lineno, const char *filename,
1667  int full_traceback, int nogil);
1668 
1669 /* DictGetItem.proto */
1670 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
1671 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
1672 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
1673  (likely(PyDict_CheckExact(obj)) ?\
1674  __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
1675 #else
1676 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
1677 #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
1678 #endif
1679 
1680 /* RaiseTooManyValuesToUnpack.proto */
1681 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
1682 
1683 /* RaiseNeedMoreValuesToUnpack.proto */
1684 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
1685 
1686 /* RaiseNoneIterError.proto */
1687 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);
1688 
1689 /* GetTopmostException.proto */
1690 #if CYTHON_USE_EXC_INFO_STACK
1691 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
1692 #endif
1693 
1694 /* SaveResetException.proto */
1695 #if CYTHON_FAST_THREAD_STATE
1696 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
1697 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1698 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
1699 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
1700 #else
1701 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
1702 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
1703 #endif
1704 
1705 /* PyErrExceptionMatches.proto */
1706 #if CYTHON_FAST_THREAD_STATE
1707 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
1708 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
1709 #else
1710 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
1711 #endif
1712 
1713 /* GetException.proto */
1714 #if CYTHON_FAST_THREAD_STATE
1715 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
1716 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1717 #else
1718 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
1719 #endif
1720 
1721 /* IncludeStringH.proto */
1722 #include <string.h>
1723 
1724 /* BytesEquals.proto */
1725 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
1726 
1727 /* UnicodeEquals.proto */
1728 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
1729 
1730 /* StrEquals.proto */
1731 #if PY_MAJOR_VERSION >= 3
1732 #define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
1733 #else
1734 #define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
1735 #endif
1736 
1737 /* None.proto */
1738 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t);
1739 
1740 /* UnaryNegOverflows.proto */
1741 #define UNARY_NEG_WOULD_OVERFLOW(x)\
1742  (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x)))
1743 
1744 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
1745 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *); /*proto*/
1746 /* GetAttr.proto */
1747 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
1748 
1749 /* GetItemInt.proto */
1750 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1751  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1752  __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
1753  (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
1754  __Pyx_GetItemInt_Generic(o, to_py_func(i))))
1755 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1756  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1757  __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1758  (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
1759 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
1760  int wraparound, int boundscheck);
1761 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
1762  (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
1763  __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
1764  (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
1765 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
1766  int wraparound, int boundscheck);
1767 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
1768 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
1769  int is_list, int wraparound, int boundscheck);
1770 
1771 /* ObjectGetItem.proto */
1772 #if CYTHON_USE_TYPE_SLOTS
1773 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);
1774 #else
1775 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
1776 #endif
1777 
1778 /* decode_c_string_utf16.proto */
1779 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) {
1780  int byteorder = 0;
1781  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1782 }
1783 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) {
1784  int byteorder = -1;
1785  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1786 }
1787 static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) {
1788  int byteorder = 1;
1789  return PyUnicode_DecodeUTF16(s, size, errors, &byteorder);
1790 }
1791 
1792 /* decode_c_string.proto */
1793 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
1794  const char* cstring, Py_ssize_t start, Py_ssize_t stop,
1795  const char* encoding, const char* errors,
1796  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors));
1797 
1798 /* GetAttr3.proto */
1799 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
1800 
1801 /* SwapException.proto */
1802 #if CYTHON_FAST_THREAD_STATE
1803 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
1804 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
1805 #else
1806 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
1807 #endif
1808 
1809 /* Import.proto */
1810 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
1811 
1812 /* FastTypeChecks.proto */
1813 #if CYTHON_COMPILING_IN_CPYTHON
1814 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
1815 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
1816 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
1817 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
1818 #else
1819 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
1820 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
1821 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
1822 #endif
1823 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
1824 
1825 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
1826 /* ListCompAppend.proto */
1827 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1828 static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
1829  PyListObject* L = (PyListObject*) list;
1830  Py_ssize_t len = Py_SIZE(list);
1831  if (likely(L->allocated > len)) {
1832  Py_INCREF(x);
1833  PyList_SET_ITEM(list, len, x);
1834  Py_SIZE(list) = len+1;
1835  return 0;
1836  }
1837  return PyList_Append(list, x);
1838 }
1839 #else
1840 #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
1841 #endif
1842 
1843 /* PyIntBinop.proto */
1844 #if !CYTHON_COMPILING_IN_PYPY
1845 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
1846 #else
1847 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
1848  (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
1849 #endif
1850 
1851 /* ListExtend.proto */
1852 static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) {
1853 #if CYTHON_COMPILING_IN_CPYTHON
1854  PyObject* none = _PyList_Extend((PyListObject*)L, v);
1855  if (unlikely(!none))
1856  return -1;
1857  Py_DECREF(none);
1858  return 0;
1859 #else
1860  return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v);
1861 #endif
1862 }
1863 
1864 /* ListAppend.proto */
1865 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
1866 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
1867  PyListObject* L = (PyListObject*) list;
1868  Py_ssize_t len = Py_SIZE(list);
1869  if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
1870  Py_INCREF(x);
1871  PyList_SET_ITEM(list, len, x);
1872  Py_SIZE(list) = len+1;
1873  return 0;
1874  }
1875  return PyList_Append(list, x);
1876 }
1877 #else
1878 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
1879 #endif
1880 
1881 /* None.proto */
1882 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
1883 
1884 /* None.proto */
1885 static CYTHON_INLINE long __Pyx_div_long(long, long);
1886 
1887 /* ImportFrom.proto */
1888 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
1889 
1890 /* HasAttr.proto */
1891 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
1892 
1893 /* StringJoin.proto */
1894 #if PY_MAJOR_VERSION < 3
1895 #define __Pyx_PyString_Join __Pyx_PyBytes_Join
1896 #define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
1897 #else
1898 #define __Pyx_PyString_Join PyUnicode_Join
1899 #define __Pyx_PyBaseString_Join PyUnicode_Join
1900 #endif
1901 #if CYTHON_COMPILING_IN_CPYTHON
1902  #if PY_MAJOR_VERSION < 3
1903  #define __Pyx_PyBytes_Join _PyString_Join
1904  #else
1905  #define __Pyx_PyBytes_Join _PyBytes_Join
1906  #endif
1907 #else
1908 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
1909 #endif
1910 
1911 /* PyObject_Unicode.proto */
1912 #if PY_MAJOR_VERSION >= 3
1913 #define __Pyx_PyObject_Unicode(obj)\
1914  (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
1915 #else
1916 #define __Pyx_PyObject_Unicode(obj)\
1917  (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
1918 #endif
1919 
1920 /* PyObject_GenericGetAttrNoDict.proto */
1921 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1922 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
1923 #else
1924 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
1925 #endif
1926 
1927 /* PyObject_GenericGetAttr.proto */
1928 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
1929 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
1930 #else
1931 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
1932 #endif
1933 
1934 /* SetupReduce.proto */
1935 static int __Pyx_setup_reduce(PyObject* type_obj);
1936 
1937 /* SetVTable.proto */
1938 static int __Pyx_SetVtable(PyObject *dict, void *vtable);
1939 
1940 /* TypeImport.proto */
1941 #ifndef __PYX_HAVE_RT_ImportType_proto
1942 #define __PYX_HAVE_RT_ImportType_proto
1943 enum __Pyx_ImportType_CheckSize {
1944  __Pyx_ImportType_CheckSize_Error = 0,
1945  __Pyx_ImportType_CheckSize_Warn = 1,
1946  __Pyx_ImportType_CheckSize_Ignore = 2
1947 };
1948 static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size);
1949 #endif
1950 
1951 /* CLineInTraceback.proto */
1952 #ifdef CYTHON_CLINE_IN_TRACEBACK
1953 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
1954 #else
1955 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
1956 #endif
1957 
1958 /* CodeObjectCache.proto */
1959 typedef struct {
1960  PyCodeObject* code_object;
1961  int code_line;
1962 } __Pyx_CodeObjectCacheEntry;
1963 struct __Pyx_CodeObjectCache {
1964  int count;
1965  int max_count;
1966  __Pyx_CodeObjectCacheEntry* entries;
1967 };
1968 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
1969 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
1970 static PyCodeObject *__pyx_find_code_object(int code_line);
1971 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
1972 
1973 /* AddTraceback.proto */
1974 static void __Pyx_AddTraceback(const char *funcname, int c_line,
1975  int py_line, const char *filename);
1976 
1977 /* CIntToPy.proto */
1978 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
1979 
1980 /* MemviewDtypeToObject.proto */
1981 static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp);
1982 static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj);
1983 
1984 /* MemviewDtypeToObject.proto */
1985 static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp);
1986 static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj);
1987 
1988 /* Print.proto */
1989 static int __Pyx_Print(PyObject*, PyObject *, int);
1990 #if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3
1991 static PyObject* __pyx_print = 0;
1992 static PyObject* __pyx_print_kwargs = 0;
1993 #endif
1994 
1995 /* RealImag.proto */
1996 #if CYTHON_CCOMPLEX
1997  #ifdef __cplusplus
1998  #define __Pyx_CREAL(z) ((z).real())
1999  #define __Pyx_CIMAG(z) ((z).imag())
2000  #else
2001  #define __Pyx_CREAL(z) (__real__(z))
2002  #define __Pyx_CIMAG(z) (__imag__(z))
2003  #endif
2004 #else
2005  #define __Pyx_CREAL(z) ((z).real)
2006  #define __Pyx_CIMAG(z) ((z).imag)
2007 #endif
2008 #if defined(__cplusplus) && CYTHON_CCOMPLEX\
2009  && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103)
2010  #define __Pyx_SET_CREAL(z,x) ((z).real(x))
2011  #define __Pyx_SET_CIMAG(z,y) ((z).imag(y))
2012 #else
2013  #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x)
2014  #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y)
2015 #endif
2016 
2017 /* Arithmetic.proto */
2018 #if CYTHON_CCOMPLEX
2019  #define __Pyx_c_eq_float(a, b) ((a)==(b))
2020  #define __Pyx_c_sum_float(a, b) ((a)+(b))
2021  #define __Pyx_c_diff_float(a, b) ((a)-(b))
2022  #define __Pyx_c_prod_float(a, b) ((a)*(b))
2023  #define __Pyx_c_quot_float(a, b) ((a)/(b))
2024  #define __Pyx_c_neg_float(a) (-(a))
2025  #ifdef __cplusplus
2026  #define __Pyx_c_is_zero_float(z) ((z)==(float)0)
2027  #define __Pyx_c_conj_float(z) (::std::conj(z))
2028  #if 1
2029  #define __Pyx_c_abs_float(z) (::std::abs(z))
2030  #define __Pyx_c_pow_float(a, b) (::std::pow(a, b))
2031  #endif
2032  #else
2033  #define __Pyx_c_is_zero_float(z) ((z)==0)
2034  #define __Pyx_c_conj_float(z) (conjf(z))
2035  #if 1
2036  #define __Pyx_c_abs_float(z) (cabsf(z))
2037  #define __Pyx_c_pow_float(a, b) (cpowf(a, b))
2038  #endif
2039  #endif
2040 #else
2041  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex, __pyx_t_float_complex);
2042  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex, __pyx_t_float_complex);
2043  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex, __pyx_t_float_complex);
2044  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex, __pyx_t_float_complex);
2045  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex, __pyx_t_float_complex);
2046  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex);
2047  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex);
2048  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex);
2049  #if 1
2050  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex);
2051  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex, __pyx_t_float_complex);
2052  #endif
2053 #endif
2054 
2055 /* Arithmetic.proto */
2056 #if CYTHON_CCOMPLEX
2057  #define __Pyx_c_eq_double(a, b) ((a)==(b))
2058  #define __Pyx_c_sum_double(a, b) ((a)+(b))
2059  #define __Pyx_c_diff_double(a, b) ((a)-(b))
2060  #define __Pyx_c_prod_double(a, b) ((a)*(b))
2061  #define __Pyx_c_quot_double(a, b) ((a)/(b))
2062  #define __Pyx_c_neg_double(a) (-(a))
2063  #ifdef __cplusplus
2064  #define __Pyx_c_is_zero_double(z) ((z)==(double)0)
2065  #define __Pyx_c_conj_double(z) (::std::conj(z))
2066  #if 1
2067  #define __Pyx_c_abs_double(z) (::std::abs(z))
2068  #define __Pyx_c_pow_double(a, b) (::std::pow(a, b))
2069  #endif
2070  #else
2071  #define __Pyx_c_is_zero_double(z) ((z)==0)
2072  #define __Pyx_c_conj_double(z) (conj(z))
2073  #if 1
2074  #define __Pyx_c_abs_double(z) (cabs(z))
2075  #define __Pyx_c_pow_double(a, b) (cpow(a, b))
2076  #endif
2077  #endif
2078 #else
2079  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex, __pyx_t_double_complex);
2080  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex, __pyx_t_double_complex);
2081  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex, __pyx_t_double_complex);
2082  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex, __pyx_t_double_complex);
2083  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex, __pyx_t_double_complex);
2084  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex);
2085  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex);
2086  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex);
2087  #if 1
2088  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex);
2089  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex, __pyx_t_double_complex);
2090  #endif
2091 #endif
2092 
2093 /* CIntToPy.proto */
2094 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value);
2095 
2096 #if PY_MAJOR_VERSION < 3
2097  static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags);
2098  static void __Pyx_ReleaseBuffer(Py_buffer *view);
2099 #else
2100  #define __Pyx_GetBuffer PyObject_GetBuffer
2101  #define __Pyx_ReleaseBuffer PyBuffer_Release
2102 #endif
2103 
2104 
2105 /* BufferStructDeclare.proto */
2106 typedef struct {
2107  Py_ssize_t shape, strides, suboffsets;
2108 } __Pyx_Buf_DimInfo;
2109 typedef struct {
2110  size_t refcount;
2111  Py_buffer pybuffer;
2112 } __Pyx_Buffer;
2113 typedef struct {
2114  __Pyx_Buffer *rcbuffer;
2115  char *data;
2116  __Pyx_Buf_DimInfo diminfo[8];
2117 } __Pyx_LocalBuf_ND;
2118 
2119 /* MemviewSliceIsContig.proto */
2120 static int __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim);
2121 
2122 /* OverlappingSlices.proto */
2123 static int __pyx_slices_overlap(__Pyx_memviewslice *slice1,
2124  __Pyx_memviewslice *slice2,
2125  int ndim, size_t itemsize);
2126 
2127 /* Capsule.proto */
2128 static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig);
2129 
2130 /* CIntFromPy.proto */
2131 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
2132 
2133 /* TypeInfoToFormat.proto */
2134 struct __pyx_typeinfo_string {
2135  char string[3];
2136 };
2137 static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type);
2138 
2139 /* PrintOne.proto */
2140 static int __Pyx_PrintOne(PyObject* stream, PyObject *o);
2141 
2142 /* MemviewSliceCopyTemplate.proto */
2143 static __Pyx_memviewslice
2144 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
2145  const char *mode, int ndim,
2146  size_t sizeof_dtype, int contig_flag,
2147  int dtype_is_object);
2148 
2149 /* MemviewSliceInit.proto */
2150 #define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d
2151 #define __Pyx_MEMVIEW_DIRECT 1
2152 #define __Pyx_MEMVIEW_PTR 2
2153 #define __Pyx_MEMVIEW_FULL 4
2154 #define __Pyx_MEMVIEW_CONTIG 8
2155 #define __Pyx_MEMVIEW_STRIDED 16
2156 #define __Pyx_MEMVIEW_FOLLOW 32
2157 #define __Pyx_IS_C_CONTIG 1
2158 #define __Pyx_IS_F_CONTIG 2
2159 static int __Pyx_init_memviewslice(
2160  struct __pyx_memoryview_obj *memview,
2161  int ndim,
2162  __Pyx_memviewslice *memviewslice,
2163  int memview_is_new_reference);
2164 static CYTHON_INLINE int __pyx_add_acquisition_count_locked(
2165  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2166 static CYTHON_INLINE int __pyx_sub_acquisition_count_locked(
2167  __pyx_atomic_int *acquisition_count, PyThread_type_lock lock);
2168 #define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p)
2169 #define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview))
2170 #define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__)
2171 #define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__)
2172 static CYTHON_INLINE void __Pyx_INC_MEMVIEW(__Pyx_memviewslice *, int, int);
2173 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *, int, int);
2174 
2175 /* CIntFromPy.proto */
2176 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
2177 
2178 /* CIntToPy.proto */
2179 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
2180 
2181 /* CIntFromPy.proto */
2182 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);
2183 
2184 /* CheckBinaryVersion.proto */
2185 static int __Pyx_check_binary_version(void);
2186 
2187 /* InitStrings.proto */
2188 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
2189 
2190 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self); /* proto*/
2191 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto*/
2192 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj); /* proto*/
2193 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src); /* proto*/
2194 static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value); /* proto*/
2195 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto*/
2196 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2197 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2198 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp); /* proto*/
2199 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value); /* proto*/
2200 
2201 /* Module declarations from 'cpython.buffer' */
2202 
2203 /* Module declarations from 'libc.string' */
2204 
2205 /* Module declarations from 'libc.stdio' */
2206 
2207 /* Module declarations from '__builtin__' */
2208 
2209 /* Module declarations from 'cpython.type' */
2210 static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;
2211 
2212 /* Module declarations from 'cpython' */
2213 
2214 /* Module declarations from 'cpython.object' */
2215 
2216 /* Module declarations from 'cpython.ref' */
2217 
2218 /* Module declarations from 'cpython.mem' */
2219 
2220 /* Module declarations from 'numpy' */
2221 
2222 /* Module declarations from 'numpy' */
2223 static PyTypeObject *__pyx_ptype_5numpy_dtype = 0;
2224 static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0;
2225 static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0;
2226 static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0;
2227 static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0;
2228 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/
2229 
2230 /* Module declarations from 'libcpp' */
2231 
2232 /* Module declarations from 'mesh' */
2233 
2234 /* Module declarations from 'cython.view' */
2235 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
2236 
2237 /* Module declarations from 'cython' */
2238 
2239 /* Module declarations from 'cmeshTools' */
2240 static PyTypeObject *__pyx_ptype_10cmeshTools_CMesh = 0;
2241 static PyTypeObject *__pyx_ptype_10cmeshTools_CMultilevelMesh = 0;
2242 static PyTypeObject *__pyx_array_type = 0;
2243 static PyTypeObject *__pyx_MemviewEnum_type = 0;
2244 static PyTypeObject *__pyx_memoryview_type = 0;
2245 static PyTypeObject *__pyx_memoryviewslice_type = 0;
2246 static PyObject *generic = 0;
2247 static PyObject *strided = 0;
2248 static PyObject *indirect = 0;
2249 static PyObject *contiguous = 0;
2250 static PyObject *indirect_contiguous = 0;
2251 static int __pyx_memoryview_thread_locks_used;
2252 static PyThread_type_lock __pyx_memoryview_thread_locks[8];
2253 static struct __pyx_obj_10cmeshTools_CMesh *__pyx_f_10cmeshTools_CMesh_FromMesh(struct Mesh); /*proto*/
2254 static void __pyx_f_10cmeshTools_generateTetrahedralMeshFromRectangularGrid(int, int, int, double, double, double, struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2255 static void __pyx_f_10cmeshTools_cmeshToolsComputeGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2256 static void __pyx_f_10cmeshTools_generateFromTriangleFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2257 static void __pyx_f_10cmeshTools_writeTriangleFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2258 static void __pyx_f_10cmeshTools_generateFromTetgenFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2259 static void __pyx_f_10cmeshTools_generateFromTetgenFilesParallel(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2260 static void __pyx_f_10cmeshTools_writeTetgenFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2261 static void __pyx_f_10cmeshTools_write3dmFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2262 static void __pyx_f_10cmeshTools_write2dmFiles(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2263 static void __pyx_f_10cmeshTools_generateFromHexFile(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2264 static void __pyx_f_10cmeshTools_generateFrom3DMFile(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2265 static void __pyx_f_10cmeshTools_generateFrom2DMFile(struct __pyx_obj_10cmeshTools_CMesh *, PyObject *, int, int __pyx_skip_dispatch); /*proto*/
2266 static void __pyx_f_10cmeshTools_computeGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2267 static void __pyx_f_10cmeshTools_allocateGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2268 static void __pyx_f_10cmeshTools_allocateNodeAndElementNodeDataStructures(struct __pyx_obj_10cmeshTools_CMesh *, int, int, int, int __pyx_skip_dispatch); /*proto*/
2269 static void __pyx_f_10cmeshTools_constructElementBoundaryElementsArray(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2270 static void __pyx_f_10cmeshTools_generateTriangularMeshFromRectangularGrid(int, int, double, double, struct __pyx_obj_10cmeshTools_CMesh *, int, int __pyx_skip_dispatch); /*proto*/
2271 static void __pyx_f_10cmeshTools_generateHexahedralMeshFromRectangularGrid(int, int, int, int, int, int, double, double, double, struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2272 static void __pyx_f_10cmeshTools_generateQuadrilateralMeshFromRectangularGrid(int, int, int, int, double, double, struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2273 static void __pyx_f_10cmeshTools_computeGeometricInfo_triangle(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2274 static void __pyx_f_10cmeshTools_allocateGeometricInfo_triangle(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2275 static void __pyx_f_10cmeshTools_generateEdgeMeshFromRectangularGrid(int, double, struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2276 static void __pyx_f_10cmeshTools_computeGeometricInfo_edge(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2277 static void __pyx_f_10cmeshTools_allocateGeometricInfo_edge(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2278 static void __pyx_f_10cmeshTools_computeGeometricInfo_hexahedron(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2279 static void __pyx_f_10cmeshTools_computeGeometricInfo_quadrilateral(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2280 static void __pyx_f_10cmeshTools_allocateGeometricInfo_hexahedron(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2281 static void __pyx_f_10cmeshTools_allocateGeometricInfo_quadrilateral(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2282 static void __pyx_f_10cmeshTools_computeGeometricInfo_NURBS(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2283 static void __pyx_f_10cmeshTools_allocateGeometricInfo_NURBS(struct __pyx_obj_10cmeshTools_CMesh *, int __pyx_skip_dispatch); /*proto*/
2284 static struct __pyx_array_obj *__pyx_array_new(PyObject *, Py_ssize_t, char *, char *, char *); /*proto*/
2285 static void *__pyx_align_pointer(void *, size_t); /*proto*/
2286 static PyObject *__pyx_memoryview_new(PyObject *, int, int, __Pyx_TypeInfo *); /*proto*/
2287 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *); /*proto*/
2288 static PyObject *_unellipsify(PyObject *, int); /*proto*/
2289 static PyObject *assert_direct_dimensions(Py_ssize_t *, int); /*proto*/
2290 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *, PyObject *); /*proto*/
2291 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int *, Py_ssize_t, Py_ssize_t, Py_ssize_t, int, int, int, int); /*proto*/
2292 static char *__pyx_pybuffer_index(Py_buffer *, char *, Py_ssize_t, Py_ssize_t); /*proto*/
2293 static int __pyx_memslice_transpose(__Pyx_memviewslice *); /*proto*/
2294 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice, int, PyObject *(*)(char *), int (*)(char *, PyObject *), int); /*proto*/
2295 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2296 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2297 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *); /*proto*/
2298 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *, __Pyx_memviewslice *); /*proto*/
2299 static Py_ssize_t abs_py_ssize_t(Py_ssize_t); /*proto*/
2300 static char __pyx_get_best_slice_order(__Pyx_memviewslice *, int); /*proto*/
2301 static void _copy_strided_to_strided(char *, Py_ssize_t *, char *, Py_ssize_t *, Py_ssize_t *, Py_ssize_t *, int, size_t); /*proto*/
2302 static void copy_strided_to_strided(__Pyx_memviewslice *, __Pyx_memviewslice *, int, size_t); /*proto*/
2303 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *, int); /*proto*/
2304 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *, Py_ssize_t *, Py_ssize_t, int, char); /*proto*/
2305 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *, __Pyx_memviewslice *, char, int); /*proto*/
2306 static int __pyx_memoryview_err_extents(int, Py_ssize_t, Py_ssize_t); /*proto*/
2307 static int __pyx_memoryview_err_dim(PyObject *, char *, int); /*proto*/
2308 static int __pyx_memoryview_err(PyObject *, char *); /*proto*/
2309 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice, __Pyx_memviewslice, int, int, int); /*proto*/
2310 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *, int, int); /*proto*/
2311 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *, int, int, int); /*proto*/
2312 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2313 static void __pyx_memoryview_refcount_objects_in_slice(char *, Py_ssize_t *, Py_ssize_t *, int, int); /*proto*/
2314 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *, int, size_t, void *, int); /*proto*/
2315 static void __pyx_memoryview__slice_assign_scalar(char *, Py_ssize_t *, Py_ssize_t *, int, size_t, void *); /*proto*/
2316 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *, PyObject *); /*proto*/
2317 static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *); /*proto*/
2318 static __Pyx_TypeInfo __Pyx_TypeInfo_int = { "int", NULL, sizeof(int), { 0 }, 0, IS_UNSIGNED(int) ? 'U' : 'I', IS_UNSIGNED(int), 0 };
2319 static __Pyx_TypeInfo __Pyx_TypeInfo_double = { "double", NULL, sizeof(double), { 0 }, 0, 'R', 0, 0 };
2320 #define __Pyx_MODULE_NAME "cmeshTools"
2321 extern int __pyx_module_is_main_cmeshTools;
2322 int __pyx_module_is_main_cmeshTools = 0;
2323 
2324 /* Implementation of 'cmeshTools' */
2325 static PyObject *__pyx_builtin_TypeError;
2326 static PyObject *__pyx_builtin_range;
2327 static PyObject *__pyx_builtin_ValueError;
2328 static PyObject *__pyx_builtin_RuntimeError;
2329 static PyObject *__pyx_builtin_ImportError;
2330 static PyObject *__pyx_builtin_MemoryError;
2331 static PyObject *__pyx_builtin_enumerate;
2332 static PyObject *__pyx_builtin_Ellipsis;
2333 static PyObject *__pyx_builtin_id;
2334 static PyObject *__pyx_builtin_IndexError;
2335 static const char __pyx_k_O[] = "O";
2336 static const char __pyx_k_T[] = "T{";
2337  static const char __pyx_k_c[] = "c";
2338  static const char __pyx_k_h[] = "h";
2339  static const char __pyx_k_s[] = "(%s)";
2340  static const char __pyx_k_Lx[] = "Lx";
2341  static const char __pyx_k_Ly[] = "Ly";
2342  static const char __pyx_k_Lz[] = "Lz";
2343  static const char __pyx_k_id[] = "id";
2344  static const char __pyx_k_np[] = "np";
2345  static const char __pyx_k_nx[] = "nx";
2346  static const char __pyx_k_ny[] = "ny";
2347  static const char __pyx_k_nz[] = "nz";
2348  static const char __pyx_k_px[] = "px";
2349  static const char __pyx_k_py[] = "py";
2350  static const char __pyx_k_pz[] = "pz";
2351  static const char __pyx_k_MPI[] = "MPI";
2352  static const char __pyx_k__31[] = "^";
2353  static const char __pyx_k__32[] = "";
2354  static const char __pyx_k__33[] = ":";
2355 static const char __pyx_k__34[] = "}";
2356 static const char __pyx_k__35[] = ",";
2357 static const char __pyx_k_end[] = "end";
2358 static const char __pyx_k_new[] = "__new__";
2359 static const char __pyx_k_obj[] = "obj";
2360 static const char __pyx_k_Comm[] = "Comm";
2361 static const char __pyx_k_base[] = "base";
2362 static const char __pyx_k_dict[] = "__dict__";
2363 static const char __pyx_k_file[] = "file";
2364 static const char __pyx_k_hMin[] = "hMin";
2365 static const char __pyx_k_join[] = "join";
2366 static const char __pyx_k_main[] = "__main__";
2367 static const char __pyx_k_mode[] = "mode";
2368 static const char __pyx_k_name[] = "name";
2369 static const char __pyx_k_ndim[] = "ndim";
2370 static const char __pyx_k_pack[] = "pack";
2371 static const char __pyx_k_size[] = "size";
2372 static const char __pyx_k_step[] = "step";
2373 static const char __pyx_k_stop[] = "stop";
2374 static const char __pyx_k_test[] = "__test__";
2375 static const char __pyx_k_ASCII[] = "ASCII";
2376 static const char __pyx_k_CMesh[] = "CMesh";
2377 static const char __pyx_k_class[] = "__class__";
2378 static const char __pyx_k_cmesh[] = "cmesh";
2379 static const char __pyx_k_dtype[] = "dtype";
2380 static const char __pyx_k_empty[] = "empty";
2381 static const char __pyx_k_error[] = "error";
2382 static const char __pyx_k_flags[] = "flags";
2383 static const char __pyx_k_int32[] = "int32";
2384 static const char __pyx_k_numpy[] = "numpy";
2385 static const char __pyx_k_print[] = "print";
2386 static const char __pyx_k_range[] = "range";
2387 static const char __pyx_k_shape[] = "shape";
2388 static const char __pyx_k_start[] = "start";
2389 static const char __pyx_k_zeros[] = "zeros";
2390 static const char __pyx_k_U_KNOT[] = "U_KNOT";
2391 static const char __pyx_k_V_KNOT[] = "V_KNOT";
2392 static const char __pyx_k_W_KNOT[] = "W_KNOT";
2393 static const char __pyx_k_encode[] = "encode";
2394 static const char __pyx_k_failed[] = "failed";
2395 static const char __pyx_k_format[] = "format";
2396 static const char __pyx_k_import[] = "__import__";
2397 static const char __pyx_k_mpi4py[] = "mpi4py";
2398 static const char __pyx_k_nSpace[] = "nSpace";
2399 static const char __pyx_k_name_2[] = "__name__";
2400 static const char __pyx_k_pickle[] = "pickle";
2401 static const char __pyx_k_reduce[] = "__reduce__";
2402 static const char __pyx_k_struct[] = "struct";
2403 static const char __pyx_k_unpack[] = "unpack";
2404 static const char __pyx_k_update[] = "update";
2405 static const char __pyx_k_volume[] = "volume";
2406 static const char __pyx_k_asarray[] = "asarray";
2407 static const char __pyx_k_fortran[] = "fortran";
2408 static const char __pyx_k_memview[] = "memview";
2409 static const char __pyx_k_nLevels[] = "nLevels";
2410 static const char __pyx_k_proteus[] = "proteus";
2411 static const char __pyx_k_weights[] = "weights";
2412 static const char __pyx_k_Ellipsis[] = "Ellipsis";
2413 static const char __pyx_k_filebase[] = "filebase";
2414 static const char __pyx_k_getstate[] = "__getstate__";
2415 static const char __pyx_k_itemsize[] = "itemsize";
2416 static const char __pyx_k_pyx_type[] = "__pyx_type";
2417 static const char __pyx_k_setstate[] = "__setstate__";
2418 static const char __pyx_k_sigmaMax[] = "sigmaMax";
2419 static const char __pyx_k_TypeError[] = "TypeError";
2420 static const char __pyx_k_cmeshList[] = "cmeshList";
2421 static const char __pyx_k_enumerate[] = "enumerate";
2422 static const char __pyx_k_nodeArray[] = "nodeArray";
2423 static const char __pyx_k_pyx_state[] = "__pyx_state";
2424 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
2425 static const char __pyx_k_IndexError[] = "IndexError";
2426 static const char __pyx_k_ValueError[] = "ValueError";
2427 static const char __pyx_k_cmeshTools[] = "cmeshTools";
2428 static const char __pyx_k_elementIJK[] = "elementIJK";
2429 static const char __pyx_k_pyx_result[] = "__pyx_result";
2430 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
2431 static const char __pyx_k_ImportError[] = "ImportError";
2432 static const char __pyx_k_MemoryError[] = "MemoryError";
2433 static const char __pyx_k_PickleError[] = "PickleError";
2434 static const char __pyx_k_finestLevel[] = "finestLevel";
2435 static const char __pyx_k_RuntimeError[] = "RuntimeError";
2436 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
2437 static const char __pyx_k_stringsource[] = "stringsource";
2438 static const char __pyx_k_triangleFlag[] = "triangleFlag";
2439 static const char __pyx_k_nEdges_global[] = "nEdges_global";
2440 static const char __pyx_k_nNodes_global[] = "nNodes_global";
2441 static const char __pyx_k_nodeStarArray[] = "nodeStarArray";
2442 static const char __pyx_k_pyx_getbuffer[] = "__pyx_getbuffer";
2443 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
2444 static const char __pyx_k_wrong_nLevels[] = "wrong nLevels";
2445 static const char __pyx_k_edgeNodesArray[] = "edgeNodesArray";
2446 static const char __pyx_k_nNodes_element[] = "nNodes_element";
2447 static const char __pyx_k_refineTypeFlag[] = "refineTypeFlag";
2448 static const char __pyx_k_CMultilevelMesh[] = "CMultilevelMesh";
2449 static const char __pyx_k_View_MemoryView[] = "View.MemoryView";
2450 static const char __pyx_k_allocate_buffer[] = "allocate_buffer";
2451 static const char __pyx_k_cmultilevelMesh[] = "cmultilevelMesh";
2452 static const char __pyx_k_dtype_is_object[] = "dtype_is_object";
2453 static const char __pyx_k_elementTagArray[] = "elementTagArray";
2454 static const char __pyx_k_nodeStarOffsets[] = "nodeStarOffsets";
2455 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
2456 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
2457 static const char __pyx_k_nElements_global[] = "nElements_global";
2458 static const char __pyx_k_nodeSupportArray[] = "nodeSupportArray";
2459 static const char __pyx_k_elementNodesArray[] = "elementNodesArray";
2460 static const char __pyx_k_nodeElementsArray[] = "nodeElementsArray";
2461 static const char __pyx_k_nodeMaterialTypes[] = "nodeMaterialTypes";
2462 static const char __pyx_k_pyx_unpickle_Enum[] = "__pyx_unpickle_Enum";
2463 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
2464 static const char __pyx_k_max_nElements_node[] = "max_nElements_node";
2465 static const char __pyx_k_nodeDiametersArray[] = "nodeDiametersArray";
2466 static const char __pyx_k_nodeElementOffsets[] = "nodeElementOffsets";
2467 static const char __pyx_k_setNewestNodeBases[] = "setNewestNodeBases";
2468 static const char __pyx_k_strided_and_direct[] = "<strided and direct>";
2469 static const char __pyx_k_elementMaterialTypes[] = "elementMaterialTypes";
2470 static const char __pyx_k_strided_and_indirect[] = "<strided and indirect>";
2471 static const char __pyx_k_contiguous_and_direct[] = "<contiguous and direct>";
2472 static const char __pyx_k_elementDiametersArray[] = "elementDiametersArray";
2473 static const char __pyx_k_elementNeighborsArray[] = "elementNeighborsArray";
2474 static const char __pyx_k_MemoryView_of_r_object[] = "<MemoryView of %r object>";
2475 static const char __pyx_k_elementBoundariesArray[] = "elementBoundariesArray";
2476 static const char __pyx_k_nNodes_elementBoundary[] = "nNodes_elementBoundary";
2477 static const char __pyx_k_proteus_cmeshTools_pyx[] = "proteus/cmeshTools.pyx";
2478 static const char __pyx_k_MemoryView_of_r_at_0x_x[] = "<MemoryView of %r at 0x%x>";
2479 static const char __pyx_k_contiguous_and_indirect[] = "<contiguous and indirect>";
2480 static const char __pyx_k_elementBarycentersArray[] = "elementBarycentersArray";
2481 static const char __pyx_k_elementParentsArrayList[] = "elementParentsArrayList";
2482 static const char __pyx_k_max_nNodeNeighbors_node[] = "max_nNodeNeighbors_node";
2483 static const char __pyx_k_Cannot_index_with_type_s[] = "Cannot index with type '%s'";
2484 static const char __pyx_k_buildPythonMeshInterface[] = "buildPythonMeshInterface";
2485 static const char __pyx_k_elementChildrenArrayList[] = "elementChildrenArrayList";
2486 static const char __pyx_k_Invalid_shape_in_axis_d_d[] = "Invalid shape in axis %d: %d.";
2487 static const char __pyx_k_elementBoundaryNodesArray[] = "elementBoundaryNodesArray";
2488 static const char __pyx_k_nElementBoundaries_global[] = "nElementBoundaries_global";
2489 static const char __pyx_k_elementChildrenOffsetsList[] = "elementChildrenOffsetsList";
2490 static const char __pyx_k_elementInnerDiametersArray[] = "elementInnerDiametersArray";
2491 static const char __pyx_k_nElementBoundaries_element[] = "nElementBoundaries_element";
2492 static const char __pyx_k_itemsize_0_for_cython_array[] = "itemsize <= 0 for cython.array";
2493 static const char __pyx_k_locallyRefineMultilevelMesh[] = "locallyRefineMultilevelMesh";
2494 static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous";
2495 static const char __pyx_k_elementBoundaryElementsArray[] = "elementBoundaryElementsArray";
2496 static const char __pyx_k_elementBoundaryMaterialTypes[] = "elementBoundaryMaterialTypes";
2497 static const char __pyx_k_elementBoundaryDiametersArray[] = "elementBoundaryDiametersArray";
2498 static const char __pyx_k_unable_to_allocate_array_data[] = "unable to allocate array data.";
2499 static const char __pyx_k_exteriorElementBoundariesArray[] = "exteriorElementBoundariesArray";
2500 static const char __pyx_k_interiorElementBoundariesArray[] = "interiorElementBoundariesArray";
2501 static const char __pyx_k_strided_and_direct_or_indirect[] = "<strided and direct or indirect>";
2502 static const char __pyx_k_elementBoundaryBarycentersArray[] = "elementBoundaryBarycentersArray";
2503 static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import";
2504 static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)";
2505 static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does not expose strides";
2506 static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory.";
2507 static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview";
2508 static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview";
2509 static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array";
2510 static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd";
2511 static const char __pyx_k_Incompatible_checksums_s_vs_0xb0[] = "Incompatible checksums (%s vs 0xb068931 = (name))";
2512 static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensions not supported";
2513 static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s";
2514 static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported";
2515 static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)";
2516 static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object";
2517 static const char __pyx_k_buildPythonMeshInterfaceNoArrays[] = "buildPythonMeshInterfaceNoArrays";
2518 static const char __pyx_k_buildPythonMultilevelMeshInterfa[] = "buildPythonMultilevelMeshInterface";
2519 static const char __pyx_k_elementBoundaryLocalElementBound[] = "elementBoundaryLocalElementBoundariesArray";
2520 static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)";
2521 static const char __pyx_k_locallyRefine_nSpace_0_d_not_imp[] = "locallyRefine nSpace= {0:d} not implemented! Returning.";
2522 static const char __pyx_k_nExteriorElementBoundaries_globa[] = "nExteriorElementBoundaries_global";
2523 static const char __pyx_k_nInteriorElementBoundaries_globa[] = "nInteriorElementBoundaries_global";
2524 static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous";
2525 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
2526 static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import";
2527 static const char __pyx_k_self_mesh_cannot_be_converted_to[] = "self.mesh cannot be converted to a Python object for pickling";
2528 static const char __pyx_k_self_multilevelMesh_cannot_be_co[] = "self.multilevelMesh cannot be converted to a Python object for pickling";
2529 static const char __pyx_k_setNewestNodeBases_0_d_not_imple[] = "setNewestNodeBases= {0:d} not implemented! Returning";
2530 static const char __pyx_k_unable_to_allocate_shape_and_str[] = "unable to allocate shape and strides.";
2531 static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short.";
2532 static PyObject *__pyx_n_s_ASCII;
2533 static PyObject *__pyx_kp_s_Buffer_view_does_not_expose_stri;
2534 static PyObject *__pyx_n_s_CMesh;
2535 static PyObject *__pyx_n_s_CMultilevelMesh;
2536 static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is;
2537 static PyObject *__pyx_kp_s_Cannot_assign_to_read_only_memor;
2538 static PyObject *__pyx_kp_s_Cannot_create_writable_memory_vi;
2539 static PyObject *__pyx_kp_s_Cannot_index_with_type_s;
2540 static PyObject *__pyx_n_s_Comm;
2541 static PyObject *__pyx_n_s_Ellipsis;
2542 static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr;
2543 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor;
2544 static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2;
2545 static PyObject *__pyx_n_s_ImportError;
2546 static PyObject *__pyx_kp_s_Incompatible_checksums_s_vs_0xb0;
2547 static PyObject *__pyx_n_s_IndexError;
2548 static PyObject *__pyx_kp_s_Indirect_dimensions_not_supporte;
2549 static PyObject *__pyx_kp_s_Invalid_mode_expected_c_or_fortr;
2550 static PyObject *__pyx_kp_s_Invalid_shape_in_axis_d_d;
2551 static PyObject *__pyx_n_s_Lx;
2552 static PyObject *__pyx_n_s_Ly;
2553 static PyObject *__pyx_n_s_Lz;
2554 static PyObject *__pyx_n_s_MPI;
2555 static PyObject *__pyx_n_s_MemoryError;
2556 static PyObject *__pyx_kp_s_MemoryView_of_r_at_0x_x;
2557 static PyObject *__pyx_kp_s_MemoryView_of_r_object;
2558 static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor;
2559 static PyObject *__pyx_n_b_O;
2560 static PyObject *__pyx_kp_s_Out_of_bounds_on_buffer_access_a;
2561 static PyObject *__pyx_n_s_PickleError;
2562 static PyObject *__pyx_n_s_RuntimeError;
2563 static PyObject *__pyx_kp_b_T;
2564 static PyObject *__pyx_n_s_TypeError;
2565 static PyObject *__pyx_n_s_U_KNOT;
2566 static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object;
2567 static PyObject *__pyx_n_s_V_KNOT;
2568 static PyObject *__pyx_n_s_ValueError;
2569 static PyObject *__pyx_n_s_View_MemoryView;
2570 static PyObject *__pyx_n_s_W_KNOT;
2571 static PyObject *__pyx_kp_b__31;
2572 static PyObject *__pyx_kp_b__32;
2573 static PyObject *__pyx_kp_b__33;
2574 static PyObject *__pyx_kp_b__34;
2575 static PyObject *__pyx_kp_u__35;
2576 static PyObject *__pyx_n_s_allocate_buffer;
2577 static PyObject *__pyx_n_s_asarray;
2578 static PyObject *__pyx_n_s_base;
2579 static PyObject *__pyx_n_s_buildPythonMeshInterface;
2580 static PyObject *__pyx_n_s_buildPythonMeshInterfaceNoArrays;
2581 static PyObject *__pyx_n_s_buildPythonMultilevelMeshInterfa;
2582 static PyObject *__pyx_n_s_c;
2583 static PyObject *__pyx_n_u_c;
2584 static PyObject *__pyx_n_s_class;
2585 static PyObject *__pyx_n_s_cline_in_traceback;
2586 static PyObject *__pyx_n_s_cmesh;
2587 static PyObject *__pyx_n_s_cmeshList;
2588 static PyObject *__pyx_n_s_cmeshTools;
2589 static PyObject *__pyx_n_s_cmultilevelMesh;
2590 static PyObject *__pyx_kp_s_contiguous_and_direct;
2591 static PyObject *__pyx_kp_s_contiguous_and_indirect;
2592 static PyObject *__pyx_n_s_dict;
2593 static PyObject *__pyx_n_s_dtype;
2594 static PyObject *__pyx_n_s_dtype_is_object;
2595 static PyObject *__pyx_n_s_edgeNodesArray;
2596 static PyObject *__pyx_n_s_elementBarycentersArray;
2597 static PyObject *__pyx_n_s_elementBoundariesArray;
2598 static PyObject *__pyx_n_s_elementBoundaryBarycentersArray;
2599 static PyObject *__pyx_n_s_elementBoundaryDiametersArray;
2600 static PyObject *__pyx_n_s_elementBoundaryElementsArray;
2601 static PyObject *__pyx_n_s_elementBoundaryLocalElementBound;
2602 static PyObject *__pyx_n_s_elementBoundaryMaterialTypes;
2603 static PyObject *__pyx_n_s_elementBoundaryNodesArray;
2604 static PyObject *__pyx_n_s_elementChildrenArrayList;
2605 static PyObject *__pyx_n_s_elementChildrenOffsetsList;
2606 static PyObject *__pyx_n_s_elementDiametersArray;
2607 static PyObject *__pyx_n_s_elementIJK;
2608 static PyObject *__pyx_n_s_elementInnerDiametersArray;
2609 static PyObject *__pyx_n_s_elementMaterialTypes;
2610 static PyObject *__pyx_n_s_elementNeighborsArray;
2611 static PyObject *__pyx_n_s_elementNodesArray;
2612 static PyObject *__pyx_n_s_elementParentsArrayList;
2613 static PyObject *__pyx_n_s_elementTagArray;
2614 static PyObject *__pyx_n_s_empty;
2615 static PyObject *__pyx_n_s_encode;
2616 static PyObject *__pyx_n_s_end;
2617 static PyObject *__pyx_n_s_enumerate;
2618 static PyObject *__pyx_n_s_error;
2619 static PyObject *__pyx_n_s_exteriorElementBoundariesArray;
2620 static PyObject *__pyx_n_s_failed;
2621 static PyObject *__pyx_n_s_file;
2622 static PyObject *__pyx_n_s_filebase;
2623 static PyObject *__pyx_n_s_finestLevel;
2624 static PyObject *__pyx_n_s_flags;
2625 static PyObject *__pyx_n_s_format;
2626 static PyObject *__pyx_n_s_fortran;
2627 static PyObject *__pyx_n_u_fortran;
2628 static PyObject *__pyx_n_s_getstate;
2629 static PyObject *__pyx_kp_s_got_differing_extents_in_dimensi;
2630 static PyObject *__pyx_n_s_h;
2631 static PyObject *__pyx_n_s_hMin;
2632 static PyObject *__pyx_n_s_id;
2633 static PyObject *__pyx_n_s_import;
2634 static PyObject *__pyx_n_s_int32;
2635 static PyObject *__pyx_n_s_interiorElementBoundariesArray;
2636 static PyObject *__pyx_n_s_itemsize;
2637 static PyObject *__pyx_kp_s_itemsize_0_for_cython_array;
2638 static PyObject *__pyx_n_s_join;
2639 static PyObject *__pyx_n_s_locallyRefineMultilevelMesh;
2640 static PyObject *__pyx_kp_s_locallyRefine_nSpace_0_d_not_imp;
2641 static PyObject *__pyx_n_s_main;
2642 static PyObject *__pyx_n_s_max_nElements_node;
2643 static PyObject *__pyx_n_s_max_nNodeNeighbors_node;
2644 static PyObject *__pyx_n_s_memview;
2645 static PyObject *__pyx_n_s_mode;
2646 static PyObject *__pyx_n_s_mpi4py;
2647 static PyObject *__pyx_n_s_nEdges_global;
2648 static PyObject *__pyx_n_s_nElementBoundaries_element;
2649 static PyObject *__pyx_n_s_nElementBoundaries_global;
2650 static PyObject *__pyx_n_s_nElements_global;
2651 static PyObject *__pyx_n_s_nExteriorElementBoundaries_globa;
2652 static PyObject *__pyx_n_s_nInteriorElementBoundaries_globa;
2653 static PyObject *__pyx_n_s_nLevels;
2654 static PyObject *__pyx_n_s_nNodes_element;
2655 static PyObject *__pyx_n_s_nNodes_elementBoundary;
2656 static PyObject *__pyx_n_s_nNodes_global;
2657 static PyObject *__pyx_n_s_nSpace;
2658 static PyObject *__pyx_n_s_name;
2659 static PyObject *__pyx_n_s_name_2;
2660 static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous;
2661 static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou;
2662 static PyObject *__pyx_n_s_ndim;
2663 static PyObject *__pyx_n_s_new;
2664 static PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
2665 static PyObject *__pyx_n_s_nodeArray;
2666 static PyObject *__pyx_n_s_nodeDiametersArray;
2667 static PyObject *__pyx_n_s_nodeElementOffsets;
2668 static PyObject *__pyx_n_s_nodeElementsArray;
2669 static PyObject *__pyx_n_s_nodeMaterialTypes;
2670 static PyObject *__pyx_n_s_nodeStarArray;
2671 static PyObject *__pyx_n_s_nodeStarOffsets;
2672 static PyObject *__pyx_n_s_nodeSupportArray;
2673 static PyObject *__pyx_n_s_np;
2674 static PyObject *__pyx_n_s_numpy;
2675 static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to;
2676 static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor;
2677 static PyObject *__pyx_n_s_nx;
2678 static PyObject *__pyx_n_s_ny;
2679 static PyObject *__pyx_n_s_nz;
2680 static PyObject *__pyx_n_s_obj;
2681 static PyObject *__pyx_n_s_pack;
2682 static PyObject *__pyx_n_s_pickle;
2683 static PyObject *__pyx_n_s_print;
2684 static PyObject *__pyx_n_s_proteus;
2685 static PyObject *__pyx_kp_s_proteus_cmeshTools_pyx;
2686 static PyObject *__pyx_n_s_px;
2687 static PyObject *__pyx_n_s_py;
2688 static PyObject *__pyx_n_s_pyx_PickleError;
2689 static PyObject *__pyx_n_s_pyx_checksum;
2690 static PyObject *__pyx_n_s_pyx_getbuffer;
2691 static PyObject *__pyx_n_s_pyx_result;
2692 static PyObject *__pyx_n_s_pyx_state;
2693 static PyObject *__pyx_n_s_pyx_type;
2694 static PyObject *__pyx_n_s_pyx_unpickle_Enum;
2695 static PyObject *__pyx_n_s_pyx_vtable;
2696 static PyObject *__pyx_n_s_pz;
2697 static PyObject *__pyx_n_s_range;
2698 static PyObject *__pyx_n_s_reduce;
2699 static PyObject *__pyx_n_s_reduce_cython;
2700 static PyObject *__pyx_n_s_reduce_ex;
2701 static PyObject *__pyx_n_s_refineTypeFlag;
2702 static PyObject *__pyx_kp_u_s;
2703 static PyObject *__pyx_kp_s_self_mesh_cannot_be_converted_to;
2704 static PyObject *__pyx_kp_s_self_multilevelMesh_cannot_be_co;
2705 static PyObject *__pyx_n_s_setNewestNodeBases;
2706 static PyObject *__pyx_kp_s_setNewestNodeBases_0_d_not_imple;
2707 static PyObject *__pyx_n_s_setstate;
2708 static PyObject *__pyx_n_s_setstate_cython;
2709 static PyObject *__pyx_n_s_shape;
2710 static PyObject *__pyx_n_s_sigmaMax;
2711 static PyObject *__pyx_n_s_size;
2712 static PyObject *__pyx_n_s_start;
2713 static PyObject *__pyx_n_s_step;
2714 static PyObject *__pyx_n_s_stop;
2715 static PyObject *__pyx_kp_s_strided_and_direct;
2716 static PyObject *__pyx_kp_s_strided_and_direct_or_indirect;
2717 static PyObject *__pyx_kp_s_strided_and_indirect;
2718 static PyObject *__pyx_kp_s_stringsource;
2719 static PyObject *__pyx_n_s_struct;
2720 static PyObject *__pyx_n_s_test;
2721 static PyObject *__pyx_n_s_triangleFlag;
2722 static PyObject *__pyx_kp_s_unable_to_allocate_array_data;
2723 static PyObject *__pyx_kp_s_unable_to_allocate_shape_and_str;
2724 static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd;
2725 static PyObject *__pyx_n_s_unpack;
2726 static PyObject *__pyx_n_s_update;
2727 static PyObject *__pyx_n_s_volume;
2728 static PyObject *__pyx_n_s_weights;
2729 static PyObject *__pyx_kp_s_wrong_nLevels;
2730 static PyObject *__pyx_n_s_zeros;
2731 static int __pyx_pf_10cmeshTools_5CMesh___init__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2732 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2buildPythonMeshInterface(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2733 static PyObject *__pyx_pf_10cmeshTools_5CMesh_4buildPythonMeshInterfaceNoArrays(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2734 static PyObject *__pyx_pf_10cmeshTools_5CMesh_16nElements_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2735 static int __pyx_pf_10cmeshTools_5CMesh_16nElements_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2736 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nNodes_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2737 static int __pyx_pf_10cmeshTools_5CMesh_13nNodes_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2738 static PyObject *__pyx_pf_10cmeshTools_5CMesh_14nNodes_element___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2739 static int __pyx_pf_10cmeshTools_5CMesh_14nNodes_element_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2740 static PyObject *__pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2741 static int __pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2742 static PyObject *__pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2743 static int __pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2744 static PyObject *__pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2745 static int __pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2746 static PyObject *__pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2747 static int __pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2748 static PyObject *__pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2749 static int __pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2750 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18max_nElements_node___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2751 static int __pyx_pf_10cmeshTools_5CMesh_18max_nElements_node_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2752 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nEdges_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2753 static int __pyx_pf_10cmeshTools_5CMesh_13nEdges_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2754 static PyObject *__pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2755 static int __pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2756 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17elementNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2757 static int __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2758 static int __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2759 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2760 static int __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2761 static int __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2762 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2763 static int __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2764 static int __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2765 static PyObject *__pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2766 static int __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2767 static int __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2768 static PyObject *__pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2769 static int __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2770 static int __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2771 static PyObject *__pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2772 static int __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2773 static int __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2774 static PyObject *__pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2775 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2776 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2777 static PyObject *__pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2778 static int __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2779 static int __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2780 static PyObject *__pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2781 static int __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2782 static int __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2783 static PyObject *__pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2784 static int __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2785 static int __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2786 static PyObject *__pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2787 static int __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2788 static int __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2789 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nodeStarArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2790 static int __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2791 static int __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2792 static PyObject *__pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2793 static int __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2794 static int __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2795 static PyObject *__pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2796 static int __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2797 static int __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2798 static PyObject *__pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2799 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2800 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2801 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2802 static int __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2803 static int __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2804 static PyObject *__pyx_pf_10cmeshTools_5CMesh_9nodeArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2805 static int __pyx_pf_10cmeshTools_5CMesh_9nodeArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2806 static int __pyx_pf_10cmeshTools_5CMesh_9nodeArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2807 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2nx___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2808 static int __pyx_pf_10cmeshTools_5CMesh_2nx_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2809 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2ny___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2810 static int __pyx_pf_10cmeshTools_5CMesh_2ny_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2811 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2nz___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2812 static int __pyx_pf_10cmeshTools_5CMesh_2nz_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2813 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2px___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2814 static int __pyx_pf_10cmeshTools_5CMesh_2px_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2815 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2py___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2816 static int __pyx_pf_10cmeshTools_5CMesh_2py_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2817 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2pz___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2818 static int __pyx_pf_10cmeshTools_5CMesh_2pz_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2819 static PyObject *__pyx_pf_10cmeshTools_5CMesh_10elementIJK___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2820 static int __pyx_pf_10cmeshTools_5CMesh_10elementIJK_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2821 static int __pyx_pf_10cmeshTools_5CMesh_10elementIJK_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2822 static PyObject *__pyx_pf_10cmeshTools_5CMesh_7weights___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2823 static int __pyx_pf_10cmeshTools_5CMesh_7weights_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2824 static int __pyx_pf_10cmeshTools_5CMesh_7weights_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2825 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6U_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2826 static int __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2827 static int __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2828 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6V_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2829 static int __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2830 static int __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2831 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6W_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2832 static int __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2833 static int __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2834 static PyObject *__pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2835 static int __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2836 static int __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2837 static PyObject *__pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2838 static int __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2839 static int __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2840 static PyObject *__pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2841 static int __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2842 static int __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2843 static PyObject *__pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2844 static int __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2845 static int __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2846 static PyObject *__pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2847 static int __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2848 static int __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2849 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2850 static int __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2851 static int __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2852 static PyObject *__pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2853 static int __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2854 static int __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2855 static PyObject *__pyx_pf_10cmeshTools_5CMesh_1h___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2856 static int __pyx_pf_10cmeshTools_5CMesh_1h_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2857 static PyObject *__pyx_pf_10cmeshTools_5CMesh_4hMin___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2858 static int __pyx_pf_10cmeshTools_5CMesh_4hMin_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2859 static PyObject *__pyx_pf_10cmeshTools_5CMesh_8sigmaMax___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2860 static int __pyx_pf_10cmeshTools_5CMesh_8sigmaMax_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2861 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6volume___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2862 static int __pyx_pf_10cmeshTools_5CMesh_6volume_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2863 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self); /* proto */
2864 static PyObject *__pyx_pf_10cmeshTools_5CMesh_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2865 static PyObject *__pyx_pf_10cmeshTools_buildPythonMeshInterface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /* proto */
2866 static PyObject *__pyx_pf_10cmeshTools_2buildPythonMeshInterfaceNoArrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /* proto */
2867 static int __pyx_pf_10cmeshTools_15CMultilevelMesh___init__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_nLevels); /* proto */
2868 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_2buildPythonMultilevelMeshInterface(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2869 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2870 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2871 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2872 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2873 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2874 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2875 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2876 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2877 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2878 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2879 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2880 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2881 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
2882 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2883 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self); /* proto */
2884 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2885 static PyObject *__pyx_pf_10cmeshTools_4buildPythonMultilevelMeshInterface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmultilevelMesh); /* proto */
2886 static PyObject *__pyx_pf_10cmeshTools_6generateTetrahedralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2887 static PyObject *__pyx_pf_10cmeshTools_8cmeshToolsComputeGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2888 static PyObject *__pyx_pf_10cmeshTools_10generateFromTriangleFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2889 static PyObject *__pyx_pf_10cmeshTools_12writeTriangleFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2890 static PyObject *__pyx_pf_10cmeshTools_14generateFromTetgenFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2891 static PyObject *__pyx_pf_10cmeshTools_16generateFromTetgenFilesParallel(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2892 static PyObject *__pyx_pf_10cmeshTools_18writeTetgenFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2893 static PyObject *__pyx_pf_10cmeshTools_20write3dmFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2894 static PyObject *__pyx_pf_10cmeshTools_22write2dmFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2895 static PyObject *__pyx_pf_10cmeshTools_24generateFromHexFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2896 static PyObject *__pyx_pf_10cmeshTools_26generateFrom3DMFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2897 static PyObject *__pyx_pf_10cmeshTools_28generateFrom2DMFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base); /* proto */
2898 static PyObject *__pyx_pf_10cmeshTools_30computeGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2899 static PyObject *__pyx_pf_10cmeshTools_32allocateGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2900 static PyObject *__pyx_pf_10cmeshTools_34allocateNodeAndElementNodeDataStructures(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_nElements_global, int __pyx_v_nNodes_global, int __pyx_v_nNodes_element); /* proto */
2901 static PyObject *__pyx_pf_10cmeshTools_36constructElementBoundaryElementsArray(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2902 static PyObject *__pyx_pf_10cmeshTools_38generateTriangularMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_triangleFlag); /* proto */
2903 static PyObject *__pyx_pf_10cmeshTools_40generateHexahedralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, int __pyx_v_px, int __pyx_v_py, int __pyx_v_pz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2904 static PyObject *__pyx_pf_10cmeshTools_42generateQuadrilateralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_px, int __pyx_v_py, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2905 static PyObject *__pyx_pf_10cmeshTools_44computeGeometricInfo_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2906 static PyObject *__pyx_pf_10cmeshTools_46allocateGeometricInfo_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2907 static PyObject *__pyx_pf_10cmeshTools_48generateEdgeMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, double __pyx_v_Lx, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2908 static PyObject *__pyx_pf_10cmeshTools_50computeGeometricInfo_edge(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2909 static PyObject *__pyx_pf_10cmeshTools_52allocateGeometricInfo_edge(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2910 static PyObject *__pyx_pf_10cmeshTools_54computeGeometricInfo_hexahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2911 static PyObject *__pyx_pf_10cmeshTools_56computeGeometricInfo_quadrilateral(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2912 static PyObject *__pyx_pf_10cmeshTools_58allocateGeometricInfo_hexahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2913 static PyObject *__pyx_pf_10cmeshTools_60allocateGeometricInfo_quadrilateral(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2914 static PyObject *__pyx_pf_10cmeshTools_62computeGeometricInfo_NURBS(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2915 static PyObject *__pyx_pf_10cmeshTools_64allocateGeometricInfo_NURBS(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh); /* proto */
2916 static PyObject *__pyx_pf_10cmeshTools_66locallyRefineMultilevelMesh(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nSpace, struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh, PyArrayObject *__pyx_v_elementTagArray, int __pyx_v_refineTypeFlag); /* proto */
2917 static PyObject *__pyx_pf_10cmeshTools_68setNewestNodeBases(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nSpace, struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh); /* proto */
2918 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2919 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
2920 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer); /* proto */
2921 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2922 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2923 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2924 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self); /* proto */
2925 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr); /* proto */
2926 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item); /* proto */
2927 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /* proto */
2928 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self); /* proto */
2929 static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2930 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
2931 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
2932 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self); /* proto */
2933 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
2934 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object); /* proto */
2935 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2936 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index); /* proto */
2937 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /* proto */
2938 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */
2939 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2940 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2941 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2942 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2943 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2944 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2945 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2946 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2947 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2948 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2949 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2950 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2951 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2952 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2953 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2954 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2955 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self); /* proto */
2956 static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2957 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2958 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2959 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self); /* proto */
2960 static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
2961 static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
2962 static PyObject *__pyx_tp_new_10cmeshTools_CMesh(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2963 static PyObject *__pyx_tp_new_10cmeshTools_CMultilevelMesh(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2964 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2965 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2966 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2967 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
2968 static PyObject *__pyx_int_0;
2969 static PyObject *__pyx_int_1;
2970 static PyObject *__pyx_int_184977713;
2971 static PyObject *__pyx_int_neg_1;
2972 static PyObject *__pyx_tuple_;
2973 static PyObject *__pyx_tuple__2;
2974 static PyObject *__pyx_tuple__3;
2975 static PyObject *__pyx_tuple__4;
2976 static PyObject *__pyx_tuple__5;
2977 static PyObject *__pyx_tuple__6;
2978 static PyObject *__pyx_tuple__7;
2979 static PyObject *__pyx_tuple__8;
2980 static PyObject *__pyx_tuple__9;
2981 static PyObject *__pyx_slice__27;
2982 static PyObject *__pyx_tuple__10;
2983 static PyObject *__pyx_tuple__11;
2984 static PyObject *__pyx_tuple__12;
2985 static PyObject *__pyx_tuple__13;
2986 static PyObject *__pyx_tuple__14;
2987 static PyObject *__pyx_tuple__15;
2988 static PyObject *__pyx_tuple__16;
2989 static PyObject *__pyx_tuple__17;
2990 static PyObject *__pyx_tuple__18;
2991 static PyObject *__pyx_tuple__19;
2992 static PyObject *__pyx_tuple__20;
2993 static PyObject *__pyx_tuple__21;
2994 static PyObject *__pyx_tuple__22;
2995 static PyObject *__pyx_tuple__23;
2996 static PyObject *__pyx_tuple__24;
2997 static PyObject *__pyx_tuple__25;
2998 static PyObject *__pyx_tuple__26;
2999 static PyObject *__pyx_tuple__28;
3000 static PyObject *__pyx_tuple__29;
3001 static PyObject *__pyx_tuple__30;
3002 static PyObject *__pyx_tuple__36;
3003 static PyObject *__pyx_tuple__38;
3004 static PyObject *__pyx_tuple__40;
3005 static PyObject *__pyx_tuple__42;
3006 static PyObject *__pyx_tuple__44;
3007 static PyObject *__pyx_tuple__46;
3008 static PyObject *__pyx_tuple__47;
3009 static PyObject *__pyx_tuple__48;
3010 static PyObject *__pyx_tuple__49;
3011 static PyObject *__pyx_tuple__50;
3012 static PyObject *__pyx_tuple__51;
3013 static PyObject *__pyx_codeobj__37;
3014 static PyObject *__pyx_codeobj__39;
3015 static PyObject *__pyx_codeobj__41;
3016 static PyObject *__pyx_codeobj__43;
3017 static PyObject *__pyx_codeobj__45;
3018 static PyObject *__pyx_codeobj__52;
3019 /* Late includes */
3020 
3021 /* "cmeshTools.pyx":12
3022  *
3023  * cdef class CMesh:
3024  * def __init__(self): # <<<<<<<<<<<<<<
3025  * self.mesh = cppm.Mesh()
3026  * cppm.initializeMesh(self.mesh)
3027  */
3028 
3029 /* Python wrapper */
3030 static int __pyx_pw_10cmeshTools_5CMesh_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3031 static int __pyx_pw_10cmeshTools_5CMesh_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3032  int __pyx_r;
3033  __Pyx_RefNannyDeclarations
3034  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
3035  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
3036  __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
3037  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
3038  __pyx_r = __pyx_pf_10cmeshTools_5CMesh___init__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
3039 
3040  /* function exit code */
3041  __Pyx_RefNannyFinishContext();
3042  return __pyx_r;
3043 }
3044 
3045 static int __pyx_pf_10cmeshTools_5CMesh___init__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
3046  int __pyx_r;
3047  __Pyx_RefNannyDeclarations
3048  struct Mesh __pyx_t_1;
3049  __Pyx_RefNannySetupContext("__init__", 0);
3050 
3051  /* "cmeshTools.pyx":13
3052  * cdef class CMesh:
3053  * def __init__(self):
3054  * self.mesh = cppm.Mesh() # <<<<<<<<<<<<<<
3055  * cppm.initializeMesh(self.mesh)
3056  *
3057  */
3058  __pyx_v_self->mesh = __pyx_t_1;
3059 
3060  /* "cmeshTools.pyx":14
3061  * def __init__(self):
3062  * self.mesh = cppm.Mesh()
3063  * cppm.initializeMesh(self.mesh) # <<<<<<<<<<<<<<
3064  *
3065  * def buildPythonMeshInterface(self):
3066  */
3067  initializeMesh(__pyx_v_self->mesh);
3068 
3069  /* "cmeshTools.pyx":12
3070  *
3071  * cdef class CMesh:
3072  * def __init__(self): # <<<<<<<<<<<<<<
3073  * self.mesh = cppm.Mesh()
3074  * cppm.initializeMesh(self.mesh)
3075  */
3076 
3077  /* function exit code */
3078  __pyx_r = 0;
3079  __Pyx_RefNannyFinishContext();
3080  return __pyx_r;
3081 }
3082 
3083 /* "cmeshTools.pyx":16
3084  * cppm.initializeMesh(self.mesh)
3085  *
3086  * def buildPythonMeshInterface(self): # <<<<<<<<<<<<<<
3087  * cdef int dim1
3088  * self.nElements_global = self.mesh.nElements_global
3089  */
3090 
3091 /* Python wrapper */
3092 static PyObject *__pyx_pw_10cmeshTools_5CMesh_3buildPythonMeshInterface(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
3093 static PyObject *__pyx_pw_10cmeshTools_5CMesh_3buildPythonMeshInterface(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
3094  PyObject *__pyx_r = 0;
3095  __Pyx_RefNannyDeclarations
3096  __Pyx_RefNannySetupContext("buildPythonMeshInterface (wrapper)", 0);
3097  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2buildPythonMeshInterface(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
3098 
3099  /* function exit code */
3100  __Pyx_RefNannyFinishContext();
3101  return __pyx_r;
3102 }
3103 
3104 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2buildPythonMeshInterface(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
3105  PyObject *__pyx_r = NULL;
3106  __Pyx_RefNannyDeclarations
3107  int __pyx_t_1;
3108  PyObject *__pyx_t_2 = NULL;
3109  PyObject *__pyx_t_3 = NULL;
3110  PyObject *__pyx_t_4 = NULL;
3111  int *__pyx_t_5;
3112  struct __pyx_array_obj *__pyx_t_6 = NULL;
3113  PyObject *__pyx_t_7 = NULL;
3114  int __pyx_t_8;
3115  double *__pyx_t_9;
3116  double __pyx_t_10;
3117  __Pyx_RefNannySetupContext("buildPythonMeshInterface", 0);
3118 
3119  /* "cmeshTools.pyx":18
3120  * def buildPythonMeshInterface(self):
3121  * cdef int dim1
3122  * self.nElements_global = self.mesh.nElements_global # <<<<<<<<<<<<<<
3123  * self.nNodes_global = self.mesh.nNodes_global
3124  * self.nNodes_element = self.mesh.nNodes_element
3125  */
3126  __pyx_t_1 = __pyx_v_self->mesh.nElements_global;
3127  __pyx_v_self->nElements_global = __pyx_t_1;
3128 
3129  /* "cmeshTools.pyx":19
3130  * cdef int dim1
3131  * self.nElements_global = self.mesh.nElements_global
3132  * self.nNodes_global = self.mesh.nNodes_global # <<<<<<<<<<<<<<
3133  * self.nNodes_element = self.mesh.nNodes_element
3134  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
3135  */
3136  __pyx_t_1 = __pyx_v_self->mesh.nNodes_global;
3137  __pyx_v_self->nNodes_global = __pyx_t_1;
3138 
3139  /* "cmeshTools.pyx":20
3140  * self.nElements_global = self.mesh.nElements_global
3141  * self.nNodes_global = self.mesh.nNodes_global
3142  * self.nNodes_element = self.mesh.nNodes_element # <<<<<<<<<<<<<<
3143  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
3144  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
3145  */
3146  __pyx_t_1 = __pyx_v_self->mesh.nNodes_element;
3147  __pyx_v_self->nNodes_element = __pyx_t_1;
3148 
3149  /* "cmeshTools.pyx":21
3150  * self.nNodes_global = self.mesh.nNodes_global
3151  * self.nNodes_element = self.mesh.nNodes_element
3152  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary # <<<<<<<<<<<<<<
3153  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
3154  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
3155  */
3156  __pyx_t_1 = __pyx_v_self->mesh.nNodes_elementBoundary;
3157  __pyx_v_self->nNodes_elementBoundary = __pyx_t_1;
3158 
3159  /* "cmeshTools.pyx":22
3160  * self.nNodes_element = self.mesh.nNodes_element
3161  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
3162  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element # <<<<<<<<<<<<<<
3163  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
3164  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
3165  */
3166  __pyx_t_1 = __pyx_v_self->mesh.nElementBoundaries_element;
3167  __pyx_v_self->nElementBoundaries_element = __pyx_t_1;
3168 
3169  /* "cmeshTools.pyx":23
3170  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
3171  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
3172  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global # <<<<<<<<<<<<<<
3173  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
3174  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
3175  */
3176  __pyx_t_1 = __pyx_v_self->mesh.nElementBoundaries_global;
3177  __pyx_v_self->nElementBoundaries_global = __pyx_t_1;
3178 
3179  /* "cmeshTools.pyx":24
3180  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
3181  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
3182  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global # <<<<<<<<<<<<<<
3183  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
3184  * self.max_nElements_node = self.mesh.max_nElements_node
3185  */
3186  __pyx_t_1 = __pyx_v_self->mesh.nInteriorElementBoundaries_global;
3187  __pyx_v_self->nInteriorElementBoundaries_global = __pyx_t_1;
3188 
3189  /* "cmeshTools.pyx":25
3190  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
3191  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
3192  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global # <<<<<<<<<<<<<<
3193  * self.max_nElements_node = self.mesh.max_nElements_node
3194  * self.nEdges_global = self.mesh.nEdges_global
3195  */
3196  __pyx_t_1 = __pyx_v_self->mesh.nExteriorElementBoundaries_global;
3197  __pyx_v_self->nExteriorElementBoundaries_global = __pyx_t_1;
3198 
3199  /* "cmeshTools.pyx":26
3200  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
3201  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
3202  * self.max_nElements_node = self.mesh.max_nElements_node # <<<<<<<<<<<<<<
3203  * self.nEdges_global = self.mesh.nEdges_global
3204  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
3205  */
3206  __pyx_t_1 = __pyx_v_self->mesh.max_nElements_node;
3207  __pyx_v_self->max_nElements_node = __pyx_t_1;
3208 
3209  /* "cmeshTools.pyx":27
3210  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
3211  * self.max_nElements_node = self.mesh.max_nElements_node
3212  * self.nEdges_global = self.mesh.nEdges_global # <<<<<<<<<<<<<<
3213  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
3214  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray)
3215  */
3216  __pyx_t_1 = __pyx_v_self->mesh.nEdges_global;
3217  __pyx_v_self->nEdges_global = __pyx_t_1;
3218 
3219  /* "cmeshTools.pyx":28
3220  * self.max_nElements_node = self.mesh.max_nElements_node
3221  * self.nEdges_global = self.mesh.nEdges_global
3222  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node # <<<<<<<<<<<<<<
3223  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray)
3224  * if self.mesh.nodeElementOffsets != NULL:
3225  */
3226  __pyx_t_1 = __pyx_v_self->mesh.max_nNodeNeighbors_node;
3227  __pyx_v_self->max_nNodeNeighbors_node = __pyx_t_1;
3228 
3229  /* "cmeshTools.pyx":29
3230  * self.nEdges_global = self.mesh.nEdges_global
3231  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
3232  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray) # <<<<<<<<<<<<<<
3233  * if self.mesh.nodeElementOffsets != NULL:
3234  * self.nodeElementsArray = np.asarray(<int[:self.mesh.nodeElementOffsets[self.mesh.nNodes_global]]> self.mesh.nodeElementsArray)
3235  */
3236  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 29, __pyx_L1_error)
3237  __Pyx_GOTREF(__pyx_t_3);
3238  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 29, __pyx_L1_error)
3239  __Pyx_GOTREF(__pyx_t_4);
3240  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3241  __pyx_t_5 = __pyx_v_self->mesh.elementNodesArray;
3242  if (!__pyx_t_5) {
3243  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3244  __PYX_ERR(1, 29, __pyx_L1_error)
3245  }
3246  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3247  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global), ((Py_ssize_t)__pyx_v_self->mesh.nNodes_element));
3248  if (unlikely(!__pyx_t_7 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_7))) __PYX_ERR(1, 29, __pyx_L1_error)
3249  __Pyx_GOTREF(__pyx_t_7);
3250  __Pyx_GOTREF(__pyx_t_3);
3251  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
3252  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 29, __pyx_L1_error)
3253  __Pyx_GOTREF(__pyx_t_6);
3254  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3255  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3256  __pyx_t_7 = NULL;
3257  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
3258  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
3259  if (likely(__pyx_t_7)) {
3260  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
3261  __Pyx_INCREF(__pyx_t_7);
3262  __Pyx_INCREF(function);
3263  __Pyx_DECREF_SET(__pyx_t_4, function);
3264  }
3265  }
3266  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
3267  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3268  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3269  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 29, __pyx_L1_error)
3270  __Pyx_GOTREF(__pyx_t_2);
3271  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3272  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 29, __pyx_L1_error)
3273  __Pyx_GIVEREF(__pyx_t_2);
3274  __Pyx_GOTREF(__pyx_v_self->elementNodesArray);
3275  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNodesArray));
3276  __pyx_v_self->elementNodesArray = ((PyArrayObject *)__pyx_t_2);
3277  __pyx_t_2 = 0;
3278 
3279  /* "cmeshTools.pyx":30
3280  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
3281  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray)
3282  * if self.mesh.nodeElementOffsets != NULL: # <<<<<<<<<<<<<<
3283  * self.nodeElementsArray = np.asarray(<int[:self.mesh.nodeElementOffsets[self.mesh.nNodes_global]]> self.mesh.nodeElementsArray)
3284  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets)
3285  */
3286  __pyx_t_8 = ((__pyx_v_self->mesh.nodeElementOffsets != NULL) != 0);
3287  if (__pyx_t_8) {
3288 
3289  /* "cmeshTools.pyx":31
3290  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray)
3291  * if self.mesh.nodeElementOffsets != NULL:
3292  * self.nodeElementsArray = np.asarray(<int[:self.mesh.nodeElementOffsets[self.mesh.nNodes_global]]> self.mesh.nodeElementsArray) # <<<<<<<<<<<<<<
3293  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets)
3294  * else:
3295  */
3296  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 31, __pyx_L1_error)
3297  __Pyx_GOTREF(__pyx_t_4);
3298  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 31, __pyx_L1_error)
3299  __Pyx_GOTREF(__pyx_t_7);
3300  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3301  __pyx_t_5 = __pyx_v_self->mesh.nodeElementsArray;
3302  if (!__pyx_t_5) {
3303  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3304  __PYX_ERR(1, 31, __pyx_L1_error)
3305  }
3306  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3307  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)(__pyx_v_self->mesh.nodeElementOffsets[__pyx_v_self->mesh.nNodes_global])));
3308  if (unlikely(!__pyx_t_3 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(1, 31, __pyx_L1_error)
3309  __Pyx_GOTREF(__pyx_t_3);
3310  __Pyx_GOTREF(__pyx_t_4);
3311  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(int), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_5);
3312  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 31, __pyx_L1_error)
3313  __Pyx_GOTREF(__pyx_t_6);
3314  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3315  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3316  __pyx_t_3 = NULL;
3317  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3318  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
3319  if (likely(__pyx_t_3)) {
3320  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
3321  __Pyx_INCREF(__pyx_t_3);
3322  __Pyx_INCREF(function);
3323  __Pyx_DECREF_SET(__pyx_t_7, function);
3324  }
3325  }
3326  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3327  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3328  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3329  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 31, __pyx_L1_error)
3330  __Pyx_GOTREF(__pyx_t_2);
3331  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3332  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 31, __pyx_L1_error)
3333  __Pyx_GIVEREF(__pyx_t_2);
3334  __Pyx_GOTREF(__pyx_v_self->nodeElementsArray);
3335  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementsArray));
3336  __pyx_v_self->nodeElementsArray = ((PyArrayObject *)__pyx_t_2);
3337  __pyx_t_2 = 0;
3338 
3339  /* "cmeshTools.pyx":32
3340  * if self.mesh.nodeElementOffsets != NULL:
3341  * self.nodeElementsArray = np.asarray(<int[:self.mesh.nodeElementOffsets[self.mesh.nNodes_global]]> self.mesh.nodeElementsArray)
3342  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets) # <<<<<<<<<<<<<<
3343  * else:
3344  * self.nodeElementsArray = np.empty(0, dtype=np.int32)
3345  */
3346  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 32, __pyx_L1_error)
3347  __Pyx_GOTREF(__pyx_t_7);
3348  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 32, __pyx_L1_error)
3349  __Pyx_GOTREF(__pyx_t_3);
3350  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3351  __pyx_t_5 = __pyx_v_self->mesh.nodeElementOffsets;
3352  if (!__pyx_t_5) {
3353  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3354  __PYX_ERR(1, 32, __pyx_L1_error)
3355  }
3356  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3357  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)(__pyx_v_self->mesh.nNodes_global + 1)));
3358  if (unlikely(!__pyx_t_4 || !__pyx_t_7 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 32, __pyx_L1_error)
3359  __Pyx_GOTREF(__pyx_t_4);
3360  __Pyx_GOTREF(__pyx_t_7);
3361  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_5);
3362  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 32, __pyx_L1_error)
3363  __Pyx_GOTREF(__pyx_t_6);
3364  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3365  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3366  __pyx_t_4 = NULL;
3367  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3368  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
3369  if (likely(__pyx_t_4)) {
3370  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3371  __Pyx_INCREF(__pyx_t_4);
3372  __Pyx_INCREF(function);
3373  __Pyx_DECREF_SET(__pyx_t_3, function);
3374  }
3375  }
3376  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
3377  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3378  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3379  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 32, __pyx_L1_error)
3380  __Pyx_GOTREF(__pyx_t_2);
3381  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3382  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 32, __pyx_L1_error)
3383  __Pyx_GIVEREF(__pyx_t_2);
3384  __Pyx_GOTREF(__pyx_v_self->nodeElementOffsets);
3385  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementOffsets));
3386  __pyx_v_self->nodeElementOffsets = ((PyArrayObject *)__pyx_t_2);
3387  __pyx_t_2 = 0;
3388 
3389  /* "cmeshTools.pyx":30
3390  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
3391  * self.elementNodesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nNodes_element]> self.mesh.elementNodesArray)
3392  * if self.mesh.nodeElementOffsets != NULL: # <<<<<<<<<<<<<<
3393  * self.nodeElementsArray = np.asarray(<int[:self.mesh.nodeElementOffsets[self.mesh.nNodes_global]]> self.mesh.nodeElementsArray)
3394  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets)
3395  */
3396  goto __pyx_L3;
3397  }
3398 
3399  /* "cmeshTools.pyx":34
3400  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets)
3401  * else:
3402  * self.nodeElementsArray = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
3403  * self.nodeElementOffsets = np.empty(0, dtype=np.int32)
3404  *
3405  */
3406  /*else*/ {
3407  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 34, __pyx_L1_error)
3408  __Pyx_GOTREF(__pyx_t_2);
3409  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 34, __pyx_L1_error)
3410  __Pyx_GOTREF(__pyx_t_3);
3411  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3412  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 34, __pyx_L1_error)
3413  __Pyx_GOTREF(__pyx_t_2);
3414  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 34, __pyx_L1_error)
3415  __Pyx_GOTREF(__pyx_t_4);
3416  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 34, __pyx_L1_error)
3417  __Pyx_GOTREF(__pyx_t_7);
3418  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3419  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(1, 34, __pyx_L1_error)
3420  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3421  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 34, __pyx_L1_error)
3422  __Pyx_GOTREF(__pyx_t_7);
3423  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3424  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3425  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 34, __pyx_L1_error)
3426  __Pyx_GIVEREF(__pyx_t_7);
3427  __Pyx_GOTREF(__pyx_v_self->nodeElementsArray);
3428  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementsArray));
3429  __pyx_v_self->nodeElementsArray = ((PyArrayObject *)__pyx_t_7);
3430  __pyx_t_7 = 0;
3431 
3432  /* "cmeshTools.pyx":35
3433  * else:
3434  * self.nodeElementsArray = np.empty(0, dtype=np.int32)
3435  * self.nodeElementOffsets = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
3436  *
3437  * self.elementNeighborsArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementNeighborsArray)
3438  */
3439  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 35, __pyx_L1_error)
3440  __Pyx_GOTREF(__pyx_t_7);
3441  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 35, __pyx_L1_error)
3442  __Pyx_GOTREF(__pyx_t_2);
3443  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3444  __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 35, __pyx_L1_error)
3445  __Pyx_GOTREF(__pyx_t_7);
3446  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 35, __pyx_L1_error)
3447  __Pyx_GOTREF(__pyx_t_3);
3448  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_int32); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 35, __pyx_L1_error)
3449  __Pyx_GOTREF(__pyx_t_4);
3450  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3451  if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_dtype, __pyx_t_4) < 0) __PYX_ERR(1, 35, __pyx_L1_error)
3452  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3453  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple_, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 35, __pyx_L1_error)
3454  __Pyx_GOTREF(__pyx_t_4);
3455  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3456  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3457  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 35, __pyx_L1_error)
3458  __Pyx_GIVEREF(__pyx_t_4);
3459  __Pyx_GOTREF(__pyx_v_self->nodeElementOffsets);
3460  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementOffsets));
3461  __pyx_v_self->nodeElementOffsets = ((PyArrayObject *)__pyx_t_4);
3462  __pyx_t_4 = 0;
3463  }
3464  __pyx_L3:;
3465 
3466  /* "cmeshTools.pyx":37
3467  * self.nodeElementOffsets = np.empty(0, dtype=np.int32)
3468  *
3469  * self.elementNeighborsArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementNeighborsArray) # <<<<<<<<<<<<<<
3470  * self.elementBoundariesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementBoundariesArray)
3471  * self.elementBoundaryNodesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :self.mesh.nNodes_elementBoundary]> self.mesh.elementBoundaryNodesArray)
3472  */
3473  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 37, __pyx_L1_error)
3474  __Pyx_GOTREF(__pyx_t_7);
3475  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 37, __pyx_L1_error)
3476  __Pyx_GOTREF(__pyx_t_2);
3477  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3478  __pyx_t_5 = __pyx_v_self->mesh.elementNeighborsArray;
3479  if (!__pyx_t_5) {
3480  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3481  __PYX_ERR(1, 37, __pyx_L1_error)
3482  }
3483  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3484  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global), ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_element));
3485  if (unlikely(!__pyx_t_3 || !__pyx_t_7 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(1, 37, __pyx_L1_error)
3486  __Pyx_GOTREF(__pyx_t_3);
3487  __Pyx_GOTREF(__pyx_t_7);
3488  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_5);
3489  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 37, __pyx_L1_error)
3490  __Pyx_GOTREF(__pyx_t_6);
3491  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3492  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3493  __pyx_t_3 = NULL;
3494  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
3495  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3496  if (likely(__pyx_t_3)) {
3497  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3498  __Pyx_INCREF(__pyx_t_3);
3499  __Pyx_INCREF(function);
3500  __Pyx_DECREF_SET(__pyx_t_2, function);
3501  }
3502  }
3503  __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
3504  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3505  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3506  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 37, __pyx_L1_error)
3507  __Pyx_GOTREF(__pyx_t_4);
3508  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3509  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 37, __pyx_L1_error)
3510  __Pyx_GIVEREF(__pyx_t_4);
3511  __Pyx_GOTREF(__pyx_v_self->elementNeighborsArray);
3512  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNeighborsArray));
3513  __pyx_v_self->elementNeighborsArray = ((PyArrayObject *)__pyx_t_4);
3514  __pyx_t_4 = 0;
3515 
3516  /* "cmeshTools.pyx":38
3517  *
3518  * self.elementNeighborsArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementNeighborsArray)
3519  * self.elementBoundariesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementBoundariesArray) # <<<<<<<<<<<<<<
3520  * self.elementBoundaryNodesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :self.mesh.nNodes_elementBoundary]> self.mesh.elementBoundaryNodesArray)
3521  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray)
3522  */
3523  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 38, __pyx_L1_error)
3524  __Pyx_GOTREF(__pyx_t_2);
3525  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 38, __pyx_L1_error)
3526  __Pyx_GOTREF(__pyx_t_3);
3527  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3528  __pyx_t_5 = __pyx_v_self->mesh.elementBoundariesArray;
3529  if (!__pyx_t_5) {
3530  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3531  __PYX_ERR(1, 38, __pyx_L1_error)
3532  }
3533  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3534  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global), ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_element));
3535  if (unlikely(!__pyx_t_7 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_7))) __PYX_ERR(1, 38, __pyx_L1_error)
3536  __Pyx_GOTREF(__pyx_t_7);
3537  __Pyx_GOTREF(__pyx_t_2);
3538  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
3539  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 38, __pyx_L1_error)
3540  __Pyx_GOTREF(__pyx_t_6);
3541  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3542  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3543  __pyx_t_7 = NULL;
3544  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3545  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
3546  if (likely(__pyx_t_7)) {
3547  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3548  __Pyx_INCREF(__pyx_t_7);
3549  __Pyx_INCREF(function);
3550  __Pyx_DECREF_SET(__pyx_t_3, function);
3551  }
3552  }
3553  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
3554  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3555  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3556  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 38, __pyx_L1_error)
3557  __Pyx_GOTREF(__pyx_t_4);
3558  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3559  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 38, __pyx_L1_error)
3560  __Pyx_GIVEREF(__pyx_t_4);
3561  __Pyx_GOTREF(__pyx_v_self->elementBoundariesArray);
3562  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundariesArray));
3563  __pyx_v_self->elementBoundariesArray = ((PyArrayObject *)__pyx_t_4);
3564  __pyx_t_4 = 0;
3565 
3566  /* "cmeshTools.pyx":39
3567  * self.elementNeighborsArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementNeighborsArray)
3568  * self.elementBoundariesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementBoundariesArray)
3569  * self.elementBoundaryNodesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :self.mesh.nNodes_elementBoundary]> self.mesh.elementBoundaryNodesArray) # <<<<<<<<<<<<<<
3570  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray)
3571  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray)
3572  */
3573  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 39, __pyx_L1_error)
3574  __Pyx_GOTREF(__pyx_t_3);
3575  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 39, __pyx_L1_error)
3576  __Pyx_GOTREF(__pyx_t_7);
3577  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3578  __pyx_t_5 = __pyx_v_self->mesh.elementBoundaryNodesArray;
3579  if (!__pyx_t_5) {
3580  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3581  __PYX_ERR(1, 39, __pyx_L1_error)
3582  }
3583  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3584  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global), ((Py_ssize_t)__pyx_v_self->mesh.nNodes_elementBoundary));
3585  if (unlikely(!__pyx_t_2 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_2))) __PYX_ERR(1, 39, __pyx_L1_error)
3586  __Pyx_GOTREF(__pyx_t_2);
3587  __Pyx_GOTREF(__pyx_t_3);
3588  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(int), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_5);
3589  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 39, __pyx_L1_error)
3590  __Pyx_GOTREF(__pyx_t_6);
3591  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3592  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3593  __pyx_t_2 = NULL;
3594  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3595  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
3596  if (likely(__pyx_t_2)) {
3597  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
3598  __Pyx_INCREF(__pyx_t_2);
3599  __Pyx_INCREF(function);
3600  __Pyx_DECREF_SET(__pyx_t_7, function);
3601  }
3602  }
3603  __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3604  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3605  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3606  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 39, __pyx_L1_error)
3607  __Pyx_GOTREF(__pyx_t_4);
3608  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3609  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 39, __pyx_L1_error)
3610  __Pyx_GIVEREF(__pyx_t_4);
3611  __Pyx_GOTREF(__pyx_v_self->elementBoundaryNodesArray);
3612  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryNodesArray));
3613  __pyx_v_self->elementBoundaryNodesArray = ((PyArrayObject *)__pyx_t_4);
3614  __pyx_t_4 = 0;
3615 
3616  /* "cmeshTools.pyx":40
3617  * self.elementBoundariesArray = np.asarray(<int[:self.mesh.nElements_global, :self.mesh.nElementBoundaries_element]> self.mesh.elementBoundariesArray)
3618  * self.elementBoundaryNodesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :self.mesh.nNodes_elementBoundary]> self.mesh.elementBoundaryNodesArray)
3619  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray) # <<<<<<<<<<<<<<
3620  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray)
3621  * if self.mesh.nInteriorElementBoundaries_global:
3622  */
3623  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 40, __pyx_L1_error)
3624  __Pyx_GOTREF(__pyx_t_7);
3625  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 40, __pyx_L1_error)
3626  __Pyx_GOTREF(__pyx_t_2);
3627  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3628  __pyx_t_5 = __pyx_v_self->mesh.elementBoundaryElementsArray;
3629  if (!__pyx_t_5) {
3630  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3631  __PYX_ERR(1, 40, __pyx_L1_error)
3632  }
3633  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3634  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global), ((Py_ssize_t)2));
3635  if (unlikely(!__pyx_t_3 || !__pyx_t_7 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(1, 40, __pyx_L1_error)
3636  __Pyx_GOTREF(__pyx_t_3);
3637  __Pyx_GOTREF(__pyx_t_7);
3638  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_5);
3639  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 40, __pyx_L1_error)
3640  __Pyx_GOTREF(__pyx_t_6);
3641  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3642  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3643  __pyx_t_3 = NULL;
3644  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
3645  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
3646  if (likely(__pyx_t_3)) {
3647  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3648  __Pyx_INCREF(__pyx_t_3);
3649  __Pyx_INCREF(function);
3650  __Pyx_DECREF_SET(__pyx_t_2, function);
3651  }
3652  }
3653  __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
3654  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
3655  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3656  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 40, __pyx_L1_error)
3657  __Pyx_GOTREF(__pyx_t_4);
3658  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3659  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 40, __pyx_L1_error)
3660  __Pyx_GIVEREF(__pyx_t_4);
3661  __Pyx_GOTREF(__pyx_v_self->elementBoundaryElementsArray);
3662  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryElementsArray));
3663  __pyx_v_self->elementBoundaryElementsArray = ((PyArrayObject *)__pyx_t_4);
3664  __pyx_t_4 = 0;
3665 
3666  /* "cmeshTools.pyx":41
3667  * self.elementBoundaryNodesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :self.mesh.nNodes_elementBoundary]> self.mesh.elementBoundaryNodesArray)
3668  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray)
3669  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray) # <<<<<<<<<<<<<<
3670  * if self.mesh.nInteriorElementBoundaries_global:
3671  * self.interiorElementBoundariesArray = np.asarray(<int[:self.mesh.nInteriorElementBoundaries_global]> self.mesh.interiorElementBoundariesArray)
3672  */
3673  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 41, __pyx_L1_error)
3674  __Pyx_GOTREF(__pyx_t_2);
3675  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 41, __pyx_L1_error)
3676  __Pyx_GOTREF(__pyx_t_3);
3677  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3678  __pyx_t_5 = __pyx_v_self->mesh.elementBoundaryLocalElementBoundariesArray;
3679  if (!__pyx_t_5) {
3680  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3681  __PYX_ERR(1, 41, __pyx_L1_error)
3682  }
3683  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3684  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global), ((Py_ssize_t)2));
3685  if (unlikely(!__pyx_t_7 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_7))) __PYX_ERR(1, 41, __pyx_L1_error)
3686  __Pyx_GOTREF(__pyx_t_7);
3687  __Pyx_GOTREF(__pyx_t_2);
3688  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
3689  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 41, __pyx_L1_error)
3690  __Pyx_GOTREF(__pyx_t_6);
3691  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3692  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3693  __pyx_t_7 = NULL;
3694  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
3695  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
3696  if (likely(__pyx_t_7)) {
3697  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
3698  __Pyx_INCREF(__pyx_t_7);
3699  __Pyx_INCREF(function);
3700  __Pyx_DECREF_SET(__pyx_t_3, function);
3701  }
3702  }
3703  __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
3704  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3705  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3706  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 41, __pyx_L1_error)
3707  __Pyx_GOTREF(__pyx_t_4);
3708  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3709  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 41, __pyx_L1_error)
3710  __Pyx_GIVEREF(__pyx_t_4);
3711  __Pyx_GOTREF(__pyx_v_self->elementBoundaryLocalElementBoundariesArray);
3712  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryLocalElementBoundariesArray));
3713  __pyx_v_self->elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)__pyx_t_4);
3714  __pyx_t_4 = 0;
3715 
3716  /* "cmeshTools.pyx":42
3717  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray)
3718  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray)
3719  * if self.mesh.nInteriorElementBoundaries_global: # <<<<<<<<<<<<<<
3720  * self.interiorElementBoundariesArray = np.asarray(<int[:self.mesh.nInteriorElementBoundaries_global]> self.mesh.interiorElementBoundariesArray)
3721  * else:
3722  */
3723  __pyx_t_8 = (__pyx_v_self->mesh.nInteriorElementBoundaries_global != 0);
3724  if (__pyx_t_8) {
3725 
3726  /* "cmeshTools.pyx":43
3727  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray)
3728  * if self.mesh.nInteriorElementBoundaries_global:
3729  * self.interiorElementBoundariesArray = np.asarray(<int[:self.mesh.nInteriorElementBoundaries_global]> self.mesh.interiorElementBoundariesArray) # <<<<<<<<<<<<<<
3730  * else:
3731  * self.interiorElementBoundariesArray = np.empty(0, dtype=np.int32)
3732  */
3733  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 43, __pyx_L1_error)
3734  __Pyx_GOTREF(__pyx_t_3);
3735  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 43, __pyx_L1_error)
3736  __Pyx_GOTREF(__pyx_t_7);
3737  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3738  __pyx_t_5 = __pyx_v_self->mesh.interiorElementBoundariesArray;
3739  if (!__pyx_t_5) {
3740  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3741  __PYX_ERR(1, 43, __pyx_L1_error)
3742  }
3743  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3744  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nInteriorElementBoundaries_global));
3745  if (unlikely(!__pyx_t_2 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_2))) __PYX_ERR(1, 43, __pyx_L1_error)
3746  __Pyx_GOTREF(__pyx_t_2);
3747  __Pyx_GOTREF(__pyx_t_3);
3748  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(int), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_5);
3749  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 43, __pyx_L1_error)
3750  __Pyx_GOTREF(__pyx_t_6);
3751  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3752  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3753  __pyx_t_2 = NULL;
3754  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3755  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
3756  if (likely(__pyx_t_2)) {
3757  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
3758  __Pyx_INCREF(__pyx_t_2);
3759  __Pyx_INCREF(function);
3760  __Pyx_DECREF_SET(__pyx_t_7, function);
3761  }
3762  }
3763  __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3764  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3765  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3766  if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 43, __pyx_L1_error)
3767  __Pyx_GOTREF(__pyx_t_4);
3768  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3769  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 43, __pyx_L1_error)
3770  __Pyx_GIVEREF(__pyx_t_4);
3771  __Pyx_GOTREF(__pyx_v_self->interiorElementBoundariesArray);
3772  __Pyx_DECREF(((PyObject *)__pyx_v_self->interiorElementBoundariesArray));
3773  __pyx_v_self->interiorElementBoundariesArray = ((PyArrayObject *)__pyx_t_4);
3774  __pyx_t_4 = 0;
3775 
3776  /* "cmeshTools.pyx":42
3777  * self.elementBoundaryElementsArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryElementsArray)
3778  * self.elementBoundaryLocalElementBoundariesArray = np.asarray(<int[:self.mesh.nElementBoundaries_global, :2]> self.mesh.elementBoundaryLocalElementBoundariesArray)
3779  * if self.mesh.nInteriorElementBoundaries_global: # <<<<<<<<<<<<<<
3780  * self.interiorElementBoundariesArray = np.asarray(<int[:self.mesh.nInteriorElementBoundaries_global]> self.mesh.interiorElementBoundariesArray)
3781  * else:
3782  */
3783  goto __pyx_L4;
3784  }
3785 
3786  /* "cmeshTools.pyx":45
3787  * self.interiorElementBoundariesArray = np.asarray(<int[:self.mesh.nInteriorElementBoundaries_global]> self.mesh.interiorElementBoundariesArray)
3788  * else:
3789  * self.interiorElementBoundariesArray = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
3790  * self.exteriorElementBoundariesArray = np.asarray(<int[:self.mesh.nExteriorElementBoundaries_global]> self.mesh.exteriorElementBoundariesArray)
3791  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray)
3792  */
3793  /*else*/ {
3794  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 45, __pyx_L1_error)
3795  __Pyx_GOTREF(__pyx_t_4);
3796  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_empty); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 45, __pyx_L1_error)
3797  __Pyx_GOTREF(__pyx_t_7);
3798  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3799  __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 45, __pyx_L1_error)
3800  __Pyx_GOTREF(__pyx_t_4);
3801  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 45, __pyx_L1_error)
3802  __Pyx_GOTREF(__pyx_t_2);
3803  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_int32); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 45, __pyx_L1_error)
3804  __Pyx_GOTREF(__pyx_t_3);
3805  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3806  if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_dtype, __pyx_t_3) < 0) __PYX_ERR(1, 45, __pyx_L1_error)
3807  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3808  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple_, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 45, __pyx_L1_error)
3809  __Pyx_GOTREF(__pyx_t_3);
3810  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3811  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3812  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 45, __pyx_L1_error)
3813  __Pyx_GIVEREF(__pyx_t_3);
3814  __Pyx_GOTREF(__pyx_v_self->interiorElementBoundariesArray);
3815  __Pyx_DECREF(((PyObject *)__pyx_v_self->interiorElementBoundariesArray));
3816  __pyx_v_self->interiorElementBoundariesArray = ((PyArrayObject *)__pyx_t_3);
3817  __pyx_t_3 = 0;
3818  }
3819  __pyx_L4:;
3820 
3821  /* "cmeshTools.pyx":46
3822  * else:
3823  * self.interiorElementBoundariesArray = np.empty(0, dtype=np.int32)
3824  * self.exteriorElementBoundariesArray = np.asarray(<int[:self.mesh.nExteriorElementBoundaries_global]> self.mesh.exteriorElementBoundariesArray) # <<<<<<<<<<<<<<
3825  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray)
3826  * if self.mesh.nodeStarOffsets != NULL:
3827  */
3828  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 46, __pyx_L1_error)
3829  __Pyx_GOTREF(__pyx_t_4);
3830  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 46, __pyx_L1_error)
3831  __Pyx_GOTREF(__pyx_t_7);
3832  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3833  __pyx_t_5 = __pyx_v_self->mesh.exteriorElementBoundariesArray;
3834  if (!__pyx_t_5) {
3835  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3836  __PYX_ERR(1, 46, __pyx_L1_error)
3837  }
3838  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3839  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nExteriorElementBoundaries_global));
3840  if (unlikely(!__pyx_t_2 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_2))) __PYX_ERR(1, 46, __pyx_L1_error)
3841  __Pyx_GOTREF(__pyx_t_2);
3842  __Pyx_GOTREF(__pyx_t_4);
3843  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(int), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_5);
3844  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 46, __pyx_L1_error)
3845  __Pyx_GOTREF(__pyx_t_6);
3846  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3847  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3848  __pyx_t_2 = NULL;
3849  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
3850  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
3851  if (likely(__pyx_t_2)) {
3852  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
3853  __Pyx_INCREF(__pyx_t_2);
3854  __Pyx_INCREF(function);
3855  __Pyx_DECREF_SET(__pyx_t_7, function);
3856  }
3857  }
3858  __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
3859  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
3860  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3861  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 46, __pyx_L1_error)
3862  __Pyx_GOTREF(__pyx_t_3);
3863  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3864  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 46, __pyx_L1_error)
3865  __Pyx_GIVEREF(__pyx_t_3);
3866  __Pyx_GOTREF(__pyx_v_self->exteriorElementBoundariesArray);
3867  __Pyx_DECREF(((PyObject *)__pyx_v_self->exteriorElementBoundariesArray));
3868  __pyx_v_self->exteriorElementBoundariesArray = ((PyArrayObject *)__pyx_t_3);
3869  __pyx_t_3 = 0;
3870 
3871  /* "cmeshTools.pyx":47
3872  * self.interiorElementBoundariesArray = np.empty(0, dtype=np.int32)
3873  * self.exteriorElementBoundariesArray = np.asarray(<int[:self.mesh.nExteriorElementBoundaries_global]> self.mesh.exteriorElementBoundariesArray)
3874  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray) # <<<<<<<<<<<<<<
3875  * if self.mesh.nodeStarOffsets != NULL:
3876  * self.nodeStarArray = np.asarray(<int[:self.mesh.nodeStarOffsets[self.mesh.nNodes_global]]> self.mesh.nodeStarArray)
3877  */
3878  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 47, __pyx_L1_error)
3879  __Pyx_GOTREF(__pyx_t_7);
3880  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 47, __pyx_L1_error)
3881  __Pyx_GOTREF(__pyx_t_2);
3882  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3883  __pyx_t_5 = __pyx_v_self->mesh.edgeNodesArray;
3884  if (!__pyx_t_5) {
3885  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3886  __PYX_ERR(1, 47, __pyx_L1_error)
3887  }
3888  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3889  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nEdges_global), ((Py_ssize_t)2));
3890  if (unlikely(!__pyx_t_4 || !__pyx_t_7 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 47, __pyx_L1_error)
3891  __Pyx_GOTREF(__pyx_t_4);
3892  __Pyx_GOTREF(__pyx_t_7);
3893  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_5);
3894  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 47, __pyx_L1_error)
3895  __Pyx_GOTREF(__pyx_t_6);
3896  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3897  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3898  __pyx_t_4 = NULL;
3899  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
3900  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
3901  if (likely(__pyx_t_4)) {
3902  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
3903  __Pyx_INCREF(__pyx_t_4);
3904  __Pyx_INCREF(function);
3905  __Pyx_DECREF_SET(__pyx_t_2, function);
3906  }
3907  }
3908  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
3909  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
3910  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3911  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 47, __pyx_L1_error)
3912  __Pyx_GOTREF(__pyx_t_3);
3913  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3914  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 47, __pyx_L1_error)
3915  __Pyx_GIVEREF(__pyx_t_3);
3916  __Pyx_GOTREF(__pyx_v_self->edgeNodesArray);
3917  __Pyx_DECREF(((PyObject *)__pyx_v_self->edgeNodesArray));
3918  __pyx_v_self->edgeNodesArray = ((PyArrayObject *)__pyx_t_3);
3919  __pyx_t_3 = 0;
3920 
3921  /* "cmeshTools.pyx":48
3922  * self.exteriorElementBoundariesArray = np.asarray(<int[:self.mesh.nExteriorElementBoundaries_global]> self.mesh.exteriorElementBoundariesArray)
3923  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray)
3924  * if self.mesh.nodeStarOffsets != NULL: # <<<<<<<<<<<<<<
3925  * self.nodeStarArray = np.asarray(<int[:self.mesh.nodeStarOffsets[self.mesh.nNodes_global]]> self.mesh.nodeStarArray)
3926  * else:
3927  */
3928  __pyx_t_8 = ((__pyx_v_self->mesh.nodeStarOffsets != NULL) != 0);
3929  if (__pyx_t_8) {
3930 
3931  /* "cmeshTools.pyx":49
3932  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray)
3933  * if self.mesh.nodeStarOffsets != NULL:
3934  * self.nodeStarArray = np.asarray(<int[:self.mesh.nodeStarOffsets[self.mesh.nNodes_global]]> self.mesh.nodeStarArray) # <<<<<<<<<<<<<<
3935  * else:
3936  * self.nodeStarArray = np.empty(0, dtype=np.int32)
3937  */
3938  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 49, __pyx_L1_error)
3939  __Pyx_GOTREF(__pyx_t_2);
3940  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 49, __pyx_L1_error)
3941  __Pyx_GOTREF(__pyx_t_4);
3942  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3943  __pyx_t_5 = __pyx_v_self->mesh.nodeStarArray;
3944  if (!__pyx_t_5) {
3945  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
3946  __PYX_ERR(1, 49, __pyx_L1_error)
3947  }
3948  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
3949  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)(__pyx_v_self->mesh.nodeStarOffsets[__pyx_v_self->mesh.nNodes_global])));
3950  if (unlikely(!__pyx_t_7 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_7))) __PYX_ERR(1, 49, __pyx_L1_error)
3951  __Pyx_GOTREF(__pyx_t_7);
3952  __Pyx_GOTREF(__pyx_t_2);
3953  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
3954  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 49, __pyx_L1_error)
3955  __Pyx_GOTREF(__pyx_t_6);
3956  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3957  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
3958  __pyx_t_7 = NULL;
3959  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
3960  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
3961  if (likely(__pyx_t_7)) {
3962  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
3963  __Pyx_INCREF(__pyx_t_7);
3964  __Pyx_INCREF(function);
3965  __Pyx_DECREF_SET(__pyx_t_4, function);
3966  }
3967  }
3968  __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
3969  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
3970  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
3971  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 49, __pyx_L1_error)
3972  __Pyx_GOTREF(__pyx_t_3);
3973  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
3974  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 49, __pyx_L1_error)
3975  __Pyx_GIVEREF(__pyx_t_3);
3976  __Pyx_GOTREF(__pyx_v_self->nodeStarArray);
3977  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarArray));
3978  __pyx_v_self->nodeStarArray = ((PyArrayObject *)__pyx_t_3);
3979  __pyx_t_3 = 0;
3980 
3981  /* "cmeshTools.pyx":48
3982  * self.exteriorElementBoundariesArray = np.asarray(<int[:self.mesh.nExteriorElementBoundaries_global]> self.mesh.exteriorElementBoundariesArray)
3983  * self.edgeNodesArray = np.asarray(<int[:self.mesh.nEdges_global, :2]> self.mesh.edgeNodesArray)
3984  * if self.mesh.nodeStarOffsets != NULL: # <<<<<<<<<<<<<<
3985  * self.nodeStarArray = np.asarray(<int[:self.mesh.nodeStarOffsets[self.mesh.nNodes_global]]> self.mesh.nodeStarArray)
3986  * else:
3987  */
3988  goto __pyx_L5;
3989  }
3990 
3991  /* "cmeshTools.pyx":51
3992  * self.nodeStarArray = np.asarray(<int[:self.mesh.nodeStarOffsets[self.mesh.nNodes_global]]> self.mesh.nodeStarArray)
3993  * else:
3994  * self.nodeStarArray = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
3995  * self.nodeStarOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeStarOffsets)
3996  * self.elementMaterialTypes = np.asarray(<int[:self.mesh.nElements_global]> self.mesh.elementMaterialTypes)
3997  */
3998  /*else*/ {
3999  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 51, __pyx_L1_error)
4000  __Pyx_GOTREF(__pyx_t_3);
4001  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 51, __pyx_L1_error)
4002  __Pyx_GOTREF(__pyx_t_4);
4003  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4004  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 51, __pyx_L1_error)
4005  __Pyx_GOTREF(__pyx_t_3);
4006  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 51, __pyx_L1_error)
4007  __Pyx_GOTREF(__pyx_t_7);
4008  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_int32); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 51, __pyx_L1_error)
4009  __Pyx_GOTREF(__pyx_t_2);
4010  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4011  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_t_2) < 0) __PYX_ERR(1, 51, __pyx_L1_error)
4012  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4013  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple_, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 51, __pyx_L1_error)
4014  __Pyx_GOTREF(__pyx_t_2);
4015  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4016  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4017  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 51, __pyx_L1_error)
4018  __Pyx_GIVEREF(__pyx_t_2);
4019  __Pyx_GOTREF(__pyx_v_self->nodeStarArray);
4020  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarArray));
4021  __pyx_v_self->nodeStarArray = ((PyArrayObject *)__pyx_t_2);
4022  __pyx_t_2 = 0;
4023  }
4024  __pyx_L5:;
4025 
4026  /* "cmeshTools.pyx":52
4027  * else:
4028  * self.nodeStarArray = np.empty(0, dtype=np.int32)
4029  * self.nodeStarOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeStarOffsets) # <<<<<<<<<<<<<<
4030  * self.elementMaterialTypes = np.asarray(<int[:self.mesh.nElements_global]> self.mesh.elementMaterialTypes)
4031  * self.elementBoundaryMaterialTypes = np.asarray(<int[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryMaterialTypes)
4032  */
4033  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 52, __pyx_L1_error)
4034  __Pyx_GOTREF(__pyx_t_3);
4035  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 52, __pyx_L1_error)
4036  __Pyx_GOTREF(__pyx_t_4);
4037  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4038  __pyx_t_5 = __pyx_v_self->mesh.nodeStarOffsets;
4039  if (!__pyx_t_5) {
4040  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4041  __PYX_ERR(1, 52, __pyx_L1_error)
4042  }
4043  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
4044  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)(__pyx_v_self->mesh.nNodes_global + 1)));
4045  if (unlikely(!__pyx_t_7 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_7))) __PYX_ERR(1, 52, __pyx_L1_error)
4046  __Pyx_GOTREF(__pyx_t_7);
4047  __Pyx_GOTREF(__pyx_t_3);
4048  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
4049  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 52, __pyx_L1_error)
4050  __Pyx_GOTREF(__pyx_t_6);
4051  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4052  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4053  __pyx_t_7 = NULL;
4054  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4055  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
4056  if (likely(__pyx_t_7)) {
4057  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4058  __Pyx_INCREF(__pyx_t_7);
4059  __Pyx_INCREF(function);
4060  __Pyx_DECREF_SET(__pyx_t_4, function);
4061  }
4062  }
4063  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
4064  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4065  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4066  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 52, __pyx_L1_error)
4067  __Pyx_GOTREF(__pyx_t_2);
4068  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4069  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 52, __pyx_L1_error)
4070  __Pyx_GIVEREF(__pyx_t_2);
4071  __Pyx_GOTREF(__pyx_v_self->nodeStarOffsets);
4072  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarOffsets));
4073  __pyx_v_self->nodeStarOffsets = ((PyArrayObject *)__pyx_t_2);
4074  __pyx_t_2 = 0;
4075 
4076  /* "cmeshTools.pyx":53
4077  * self.nodeStarArray = np.empty(0, dtype=np.int32)
4078  * self.nodeStarOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeStarOffsets)
4079  * self.elementMaterialTypes = np.asarray(<int[:self.mesh.nElements_global]> self.mesh.elementMaterialTypes) # <<<<<<<<<<<<<<
4080  * self.elementBoundaryMaterialTypes = np.asarray(<int[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryMaterialTypes)
4081  * self.nodeMaterialTypes = np.asarray(<int[:self.mesh.nNodes_global]> self.mesh.nodeMaterialTypes)
4082  */
4083  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 53, __pyx_L1_error)
4084  __Pyx_GOTREF(__pyx_t_4);
4085  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 53, __pyx_L1_error)
4086  __Pyx_GOTREF(__pyx_t_7);
4087  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4088  __pyx_t_5 = __pyx_v_self->mesh.elementMaterialTypes;
4089  if (!__pyx_t_5) {
4090  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4091  __PYX_ERR(1, 53, __pyx_L1_error)
4092  }
4093  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
4094  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global));
4095  if (unlikely(!__pyx_t_3 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(1, 53, __pyx_L1_error)
4096  __Pyx_GOTREF(__pyx_t_3);
4097  __Pyx_GOTREF(__pyx_t_4);
4098  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(int), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_5);
4099  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 53, __pyx_L1_error)
4100  __Pyx_GOTREF(__pyx_t_6);
4101  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4102  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4103  __pyx_t_3 = NULL;
4104  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
4105  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
4106  if (likely(__pyx_t_3)) {
4107  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
4108  __Pyx_INCREF(__pyx_t_3);
4109  __Pyx_INCREF(function);
4110  __Pyx_DECREF_SET(__pyx_t_7, function);
4111  }
4112  }
4113  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
4114  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4115  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4116  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 53, __pyx_L1_error)
4117  __Pyx_GOTREF(__pyx_t_2);
4118  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4119  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 53, __pyx_L1_error)
4120  __Pyx_GIVEREF(__pyx_t_2);
4121  __Pyx_GOTREF(__pyx_v_self->elementMaterialTypes);
4122  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementMaterialTypes));
4123  __pyx_v_self->elementMaterialTypes = ((PyArrayObject *)__pyx_t_2);
4124  __pyx_t_2 = 0;
4125 
4126  /* "cmeshTools.pyx":54
4127  * self.nodeStarOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeStarOffsets)
4128  * self.elementMaterialTypes = np.asarray(<int[:self.mesh.nElements_global]> self.mesh.elementMaterialTypes)
4129  * self.elementBoundaryMaterialTypes = np.asarray(<int[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryMaterialTypes) # <<<<<<<<<<<<<<
4130  * self.nodeMaterialTypes = np.asarray(<int[:self.mesh.nNodes_global]> self.mesh.nodeMaterialTypes)
4131  * self.nodeArray = np.asarray(<double[:self.mesh.nNodes_global, :3]> self.mesh.nodeArray)
4132  */
4133  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 54, __pyx_L1_error)
4134  __Pyx_GOTREF(__pyx_t_7);
4135  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 54, __pyx_L1_error)
4136  __Pyx_GOTREF(__pyx_t_3);
4137  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4138  __pyx_t_5 = __pyx_v_self->mesh.elementBoundaryMaterialTypes;
4139  if (!__pyx_t_5) {
4140  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4141  __PYX_ERR(1, 54, __pyx_L1_error)
4142  }
4143  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
4144  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global));
4145  if (unlikely(!__pyx_t_4 || !__pyx_t_7 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 54, __pyx_L1_error)
4146  __Pyx_GOTREF(__pyx_t_4);
4147  __Pyx_GOTREF(__pyx_t_7);
4148  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_5);
4149  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 54, __pyx_L1_error)
4150  __Pyx_GOTREF(__pyx_t_6);
4151  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4152  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4153  __pyx_t_4 = NULL;
4154  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4155  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4156  if (likely(__pyx_t_4)) {
4157  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4158  __Pyx_INCREF(__pyx_t_4);
4159  __Pyx_INCREF(function);
4160  __Pyx_DECREF_SET(__pyx_t_3, function);
4161  }
4162  }
4163  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4164  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4165  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4166  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 54, __pyx_L1_error)
4167  __Pyx_GOTREF(__pyx_t_2);
4168  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4169  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 54, __pyx_L1_error)
4170  __Pyx_GIVEREF(__pyx_t_2);
4171  __Pyx_GOTREF(__pyx_v_self->elementBoundaryMaterialTypes);
4172  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryMaterialTypes));
4173  __pyx_v_self->elementBoundaryMaterialTypes = ((PyArrayObject *)__pyx_t_2);
4174  __pyx_t_2 = 0;
4175 
4176  /* "cmeshTools.pyx":55
4177  * self.elementMaterialTypes = np.asarray(<int[:self.mesh.nElements_global]> self.mesh.elementMaterialTypes)
4178  * self.elementBoundaryMaterialTypes = np.asarray(<int[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryMaterialTypes)
4179  * self.nodeMaterialTypes = np.asarray(<int[:self.mesh.nNodes_global]> self.mesh.nodeMaterialTypes) # <<<<<<<<<<<<<<
4180  * self.nodeArray = np.asarray(<double[:self.mesh.nNodes_global, :3]> self.mesh.nodeArray)
4181  * self.nx = self.mesh.nx
4182  */
4183  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 55, __pyx_L1_error)
4184  __Pyx_GOTREF(__pyx_t_3);
4185  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 55, __pyx_L1_error)
4186  __Pyx_GOTREF(__pyx_t_4);
4187  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4188  __pyx_t_5 = __pyx_v_self->mesh.nodeMaterialTypes;
4189  if (!__pyx_t_5) {
4190  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4191  __PYX_ERR(1, 55, __pyx_L1_error)
4192  }
4193  __pyx_t_7 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
4194  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nNodes_global));
4195  if (unlikely(!__pyx_t_7 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_7))) __PYX_ERR(1, 55, __pyx_L1_error)
4196  __Pyx_GOTREF(__pyx_t_7);
4197  __Pyx_GOTREF(__pyx_t_3);
4198  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(int), PyBytes_AS_STRING(__pyx_t_7), (char *) "c", (char *) __pyx_t_5);
4199  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 55, __pyx_L1_error)
4200  __Pyx_GOTREF(__pyx_t_6);
4201  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4202  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4203  __pyx_t_7 = NULL;
4204  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4205  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
4206  if (likely(__pyx_t_7)) {
4207  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4208  __Pyx_INCREF(__pyx_t_7);
4209  __Pyx_INCREF(function);
4210  __Pyx_DECREF_SET(__pyx_t_4, function);
4211  }
4212  }
4213  __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
4214  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4215  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4216  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 55, __pyx_L1_error)
4217  __Pyx_GOTREF(__pyx_t_2);
4218  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4219  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 55, __pyx_L1_error)
4220  __Pyx_GIVEREF(__pyx_t_2);
4221  __Pyx_GOTREF(__pyx_v_self->nodeMaterialTypes);
4222  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeMaterialTypes));
4223  __pyx_v_self->nodeMaterialTypes = ((PyArrayObject *)__pyx_t_2);
4224  __pyx_t_2 = 0;
4225 
4226  /* "cmeshTools.pyx":56
4227  * self.elementBoundaryMaterialTypes = np.asarray(<int[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryMaterialTypes)
4228  * self.nodeMaterialTypes = np.asarray(<int[:self.mesh.nNodes_global]> self.mesh.nodeMaterialTypes)
4229  * self.nodeArray = np.asarray(<double[:self.mesh.nNodes_global, :3]> self.mesh.nodeArray) # <<<<<<<<<<<<<<
4230  * self.nx = self.mesh.nx
4231  * self.ny = self.mesh.ny
4232  */
4233  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 56, __pyx_L1_error)
4234  __Pyx_GOTREF(__pyx_t_4);
4235  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 56, __pyx_L1_error)
4236  __Pyx_GOTREF(__pyx_t_7);
4237  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4238  __pyx_t_9 = __pyx_v_self->mesh.nodeArray;
4239  if (!__pyx_t_9) {
4240  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4241  __PYX_ERR(1, 56, __pyx_L1_error)
4242  }
4243  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
4244  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nNodes_global), ((Py_ssize_t)3));
4245  if (unlikely(!__pyx_t_3 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(1, 56, __pyx_L1_error)
4246  __Pyx_GOTREF(__pyx_t_3);
4247  __Pyx_GOTREF(__pyx_t_4);
4248  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(double), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_9);
4249  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 56, __pyx_L1_error)
4250  __Pyx_GOTREF(__pyx_t_6);
4251  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4252  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4253  __pyx_t_3 = NULL;
4254  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
4255  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
4256  if (likely(__pyx_t_3)) {
4257  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
4258  __Pyx_INCREF(__pyx_t_3);
4259  __Pyx_INCREF(function);
4260  __Pyx_DECREF_SET(__pyx_t_7, function);
4261  }
4262  }
4263  __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)__pyx_t_6));
4264  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4265  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4266  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 56, __pyx_L1_error)
4267  __Pyx_GOTREF(__pyx_t_2);
4268  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4269  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 56, __pyx_L1_error)
4270  __Pyx_GIVEREF(__pyx_t_2);
4271  __Pyx_GOTREF(__pyx_v_self->nodeArray);
4272  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeArray));
4273  __pyx_v_self->nodeArray = ((PyArrayObject *)__pyx_t_2);
4274  __pyx_t_2 = 0;
4275 
4276  /* "cmeshTools.pyx":57
4277  * self.nodeMaterialTypes = np.asarray(<int[:self.mesh.nNodes_global]> self.mesh.nodeMaterialTypes)
4278  * self.nodeArray = np.asarray(<double[:self.mesh.nNodes_global, :3]> self.mesh.nodeArray)
4279  * self.nx = self.mesh.nx # <<<<<<<<<<<<<<
4280  * self.ny = self.mesh.ny
4281  * self.nz = self.mesh.nz
4282  */
4283  __pyx_t_1 = __pyx_v_self->mesh.nx;
4284  __pyx_v_self->nx = __pyx_t_1;
4285 
4286  /* "cmeshTools.pyx":58
4287  * self.nodeArray = np.asarray(<double[:self.mesh.nNodes_global, :3]> self.mesh.nodeArray)
4288  * self.nx = self.mesh.nx
4289  * self.ny = self.mesh.ny # <<<<<<<<<<<<<<
4290  * self.nz = self.mesh.nz
4291  * self.px = self.mesh.px
4292  */
4293  __pyx_t_1 = __pyx_v_self->mesh.ny;
4294  __pyx_v_self->ny = __pyx_t_1;
4295 
4296  /* "cmeshTools.pyx":59
4297  * self.nx = self.mesh.nx
4298  * self.ny = self.mesh.ny
4299  * self.nz = self.mesh.nz # <<<<<<<<<<<<<<
4300  * self.px = self.mesh.px
4301  * self.py = self.mesh.py
4302  */
4303  __pyx_t_1 = __pyx_v_self->mesh.nz;
4304  __pyx_v_self->nz = __pyx_t_1;
4305 
4306  /* "cmeshTools.pyx":60
4307  * self.ny = self.mesh.ny
4308  * self.nz = self.mesh.nz
4309  * self.px = self.mesh.px # <<<<<<<<<<<<<<
4310  * self.py = self.mesh.py
4311  * self.pz = self.mesh.pz
4312  */
4313  __pyx_t_1 = __pyx_v_self->mesh.px;
4314  __pyx_v_self->px = __pyx_t_1;
4315 
4316  /* "cmeshTools.pyx":61
4317  * self.nz = self.mesh.nz
4318  * self.px = self.mesh.px
4319  * self.py = self.mesh.py # <<<<<<<<<<<<<<
4320  * self.pz = self.mesh.pz
4321  * if self.mesh.elementIJK != NULL:
4322  */
4323  __pyx_t_1 = __pyx_v_self->mesh.py;
4324  __pyx_v_self->py = __pyx_t_1;
4325 
4326  /* "cmeshTools.pyx":62
4327  * self.px = self.mesh.px
4328  * self.py = self.mesh.py
4329  * self.pz = self.mesh.pz # <<<<<<<<<<<<<<
4330  * if self.mesh.elementIJK != NULL:
4331  * self.elementIJK = np.asarray(<int[:self.mesh.nElements_global*3]> self.mesh.elementIJK)
4332  */
4333  __pyx_t_1 = __pyx_v_self->mesh.pz;
4334  __pyx_v_self->pz = __pyx_t_1;
4335 
4336  /* "cmeshTools.pyx":63
4337  * self.py = self.mesh.py
4338  * self.pz = self.mesh.pz
4339  * if self.mesh.elementIJK != NULL: # <<<<<<<<<<<<<<
4340  * self.elementIJK = np.asarray(<int[:self.mesh.nElements_global*3]> self.mesh.elementIJK)
4341  * else:
4342  */
4343  __pyx_t_8 = ((__pyx_v_self->mesh.elementIJK != NULL) != 0);
4344  if (__pyx_t_8) {
4345 
4346  /* "cmeshTools.pyx":64
4347  * self.pz = self.mesh.pz
4348  * if self.mesh.elementIJK != NULL:
4349  * self.elementIJK = np.asarray(<int[:self.mesh.nElements_global*3]> self.mesh.elementIJK) # <<<<<<<<<<<<<<
4350  * else:
4351  * self.elementIJK = np.empty(0, dtype=np.int32)
4352  */
4353  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 64, __pyx_L1_error)
4354  __Pyx_GOTREF(__pyx_t_7);
4355  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 64, __pyx_L1_error)
4356  __Pyx_GOTREF(__pyx_t_3);
4357  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4358  __pyx_t_5 = __pyx_v_self->mesh.elementIJK;
4359  if (!__pyx_t_5) {
4360  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4361  __PYX_ERR(1, 64, __pyx_L1_error)
4362  }
4363  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
4364  __pyx_t_7 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)(__pyx_v_self->mesh.nElements_global * 3)));
4365  if (unlikely(!__pyx_t_4 || !__pyx_t_7 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 64, __pyx_L1_error)
4366  __Pyx_GOTREF(__pyx_t_4);
4367  __Pyx_GOTREF(__pyx_t_7);
4368  __pyx_t_6 = __pyx_array_new(__pyx_t_7, sizeof(int), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_5);
4369  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 64, __pyx_L1_error)
4370  __Pyx_GOTREF(__pyx_t_6);
4371  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4372  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4373  __pyx_t_4 = NULL;
4374  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4375  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4376  if (likely(__pyx_t_4)) {
4377  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4378  __Pyx_INCREF(__pyx_t_4);
4379  __Pyx_INCREF(function);
4380  __Pyx_DECREF_SET(__pyx_t_3, function);
4381  }
4382  }
4383  __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4384  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4385  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4386  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 64, __pyx_L1_error)
4387  __Pyx_GOTREF(__pyx_t_2);
4388  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4389  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 64, __pyx_L1_error)
4390  __Pyx_GIVEREF(__pyx_t_2);
4391  __Pyx_GOTREF(__pyx_v_self->elementIJK);
4392  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementIJK));
4393  __pyx_v_self->elementIJK = ((PyArrayObject *)__pyx_t_2);
4394  __pyx_t_2 = 0;
4395 
4396  /* "cmeshTools.pyx":63
4397  * self.py = self.mesh.py
4398  * self.pz = self.mesh.pz
4399  * if self.mesh.elementIJK != NULL: # <<<<<<<<<<<<<<
4400  * self.elementIJK = np.asarray(<int[:self.mesh.nElements_global*3]> self.mesh.elementIJK)
4401  * else:
4402  */
4403  goto __pyx_L6;
4404  }
4405 
4406  /* "cmeshTools.pyx":66
4407  * self.elementIJK = np.asarray(<int[:self.mesh.nElements_global*3]> self.mesh.elementIJK)
4408  * else:
4409  * self.elementIJK = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
4410  * if self.mesh.weights != NULL:
4411  * self.weights = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.weights)
4412  */
4413  /*else*/ {
4414  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 66, __pyx_L1_error)
4415  __Pyx_GOTREF(__pyx_t_2);
4416  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 66, __pyx_L1_error)
4417  __Pyx_GOTREF(__pyx_t_3);
4418  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4419  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 66, __pyx_L1_error)
4420  __Pyx_GOTREF(__pyx_t_2);
4421  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 66, __pyx_L1_error)
4422  __Pyx_GOTREF(__pyx_t_4);
4423  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_int32); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 66, __pyx_L1_error)
4424  __Pyx_GOTREF(__pyx_t_7);
4425  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4426  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_t_7) < 0) __PYX_ERR(1, 66, __pyx_L1_error)
4427  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4428  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 66, __pyx_L1_error)
4429  __Pyx_GOTREF(__pyx_t_7);
4430  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4431  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4432  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 66, __pyx_L1_error)
4433  __Pyx_GIVEREF(__pyx_t_7);
4434  __Pyx_GOTREF(__pyx_v_self->elementIJK);
4435  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementIJK));
4436  __pyx_v_self->elementIJK = ((PyArrayObject *)__pyx_t_7);
4437  __pyx_t_7 = 0;
4438  }
4439  __pyx_L6:;
4440 
4441  /* "cmeshTools.pyx":67
4442  * else:
4443  * self.elementIJK = np.empty(0, dtype=np.int32)
4444  * if self.mesh.weights != NULL: # <<<<<<<<<<<<<<
4445  * self.weights = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.weights)
4446  * else:
4447  */
4448  __pyx_t_8 = ((__pyx_v_self->mesh.weights != NULL) != 0);
4449  if (__pyx_t_8) {
4450 
4451  /* "cmeshTools.pyx":68
4452  * self.elementIJK = np.empty(0, dtype=np.int32)
4453  * if self.mesh.weights != NULL:
4454  * self.weights = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.weights) # <<<<<<<<<<<<<<
4455  * else:
4456  * self.weights = np.empty(0)
4457  */
4458  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 68, __pyx_L1_error)
4459  __Pyx_GOTREF(__pyx_t_2);
4460  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 68, __pyx_L1_error)
4461  __Pyx_GOTREF(__pyx_t_3);
4462  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4463  __pyx_t_9 = __pyx_v_self->mesh.weights;
4464  if (!__pyx_t_9) {
4465  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4466  __PYX_ERR(1, 68, __pyx_L1_error)
4467  }
4468  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
4469  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global));
4470  if (unlikely(!__pyx_t_4 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 68, __pyx_L1_error)
4471  __Pyx_GOTREF(__pyx_t_4);
4472  __Pyx_GOTREF(__pyx_t_2);
4473  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_9);
4474  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 68, __pyx_L1_error)
4475  __Pyx_GOTREF(__pyx_t_6);
4476  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4477  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4478  __pyx_t_4 = NULL;
4479  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4480  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4481  if (likely(__pyx_t_4)) {
4482  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4483  __Pyx_INCREF(__pyx_t_4);
4484  __Pyx_INCREF(function);
4485  __Pyx_DECREF_SET(__pyx_t_3, function);
4486  }
4487  }
4488  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4489  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4490  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4491  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 68, __pyx_L1_error)
4492  __Pyx_GOTREF(__pyx_t_7);
4493  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4494  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 68, __pyx_L1_error)
4495  __Pyx_GIVEREF(__pyx_t_7);
4496  __Pyx_GOTREF(__pyx_v_self->weights);
4497  __Pyx_DECREF(((PyObject *)__pyx_v_self->weights));
4498  __pyx_v_self->weights = ((PyArrayObject *)__pyx_t_7);
4499  __pyx_t_7 = 0;
4500 
4501  /* "cmeshTools.pyx":67
4502  * else:
4503  * self.elementIJK = np.empty(0, dtype=np.int32)
4504  * if self.mesh.weights != NULL: # <<<<<<<<<<<<<<
4505  * self.weights = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.weights)
4506  * else:
4507  */
4508  goto __pyx_L7;
4509  }
4510 
4511  /* "cmeshTools.pyx":70
4512  * self.weights = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.weights)
4513  * else:
4514  * self.weights = np.empty(0) # <<<<<<<<<<<<<<
4515  * if self.mesh.U_KNOT != NULL:
4516  * self.U_KNOT = np.asarray(<double[:self.mesh.nx+self.mesh.px+1]> self.mesh.U_KNOT)
4517  */
4518  /*else*/ {
4519  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 70, __pyx_L1_error)
4520  __Pyx_GOTREF(__pyx_t_3);
4521  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 70, __pyx_L1_error)
4522  __Pyx_GOTREF(__pyx_t_4);
4523  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4524  __pyx_t_3 = NULL;
4525  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4526  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
4527  if (likely(__pyx_t_3)) {
4528  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4529  __Pyx_INCREF(__pyx_t_3);
4530  __Pyx_INCREF(function);
4531  __Pyx_DECREF_SET(__pyx_t_4, function);
4532  }
4533  }
4534  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_0);
4535  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4536  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 70, __pyx_L1_error)
4537  __Pyx_GOTREF(__pyx_t_7);
4538  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4539  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 70, __pyx_L1_error)
4540  __Pyx_GIVEREF(__pyx_t_7);
4541  __Pyx_GOTREF(__pyx_v_self->weights);
4542  __Pyx_DECREF(((PyObject *)__pyx_v_self->weights));
4543  __pyx_v_self->weights = ((PyArrayObject *)__pyx_t_7);
4544  __pyx_t_7 = 0;
4545  }
4546  __pyx_L7:;
4547 
4548  /* "cmeshTools.pyx":71
4549  * else:
4550  * self.weights = np.empty(0)
4551  * if self.mesh.U_KNOT != NULL: # <<<<<<<<<<<<<<
4552  * self.U_KNOT = np.asarray(<double[:self.mesh.nx+self.mesh.px+1]> self.mesh.U_KNOT)
4553  * else:
4554  */
4555  __pyx_t_8 = ((__pyx_v_self->mesh.U_KNOT != NULL) != 0);
4556  if (__pyx_t_8) {
4557 
4558  /* "cmeshTools.pyx":72
4559  * self.weights = np.empty(0)
4560  * if self.mesh.U_KNOT != NULL:
4561  * self.U_KNOT = np.asarray(<double[:self.mesh.nx+self.mesh.px+1]> self.mesh.U_KNOT) # <<<<<<<<<<<<<<
4562  * else:
4563  * self.U_KNOT = np.empty(0)
4564  */
4565  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 72, __pyx_L1_error)
4566  __Pyx_GOTREF(__pyx_t_4);
4567  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 72, __pyx_L1_error)
4568  __Pyx_GOTREF(__pyx_t_3);
4569  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4570  __pyx_t_9 = __pyx_v_self->mesh.U_KNOT;
4571  if (!__pyx_t_9) {
4572  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4573  __PYX_ERR(1, 72, __pyx_L1_error)
4574  }
4575  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
4576  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)((__pyx_v_self->mesh.nx + __pyx_v_self->mesh.px) + 1)));
4577  if (unlikely(!__pyx_t_2 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_2))) __PYX_ERR(1, 72, __pyx_L1_error)
4578  __Pyx_GOTREF(__pyx_t_2);
4579  __Pyx_GOTREF(__pyx_t_4);
4580  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(double), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_9);
4581  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 72, __pyx_L1_error)
4582  __Pyx_GOTREF(__pyx_t_6);
4583  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4584  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4585  __pyx_t_2 = NULL;
4586  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4587  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
4588  if (likely(__pyx_t_2)) {
4589  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4590  __Pyx_INCREF(__pyx_t_2);
4591  __Pyx_INCREF(function);
4592  __Pyx_DECREF_SET(__pyx_t_3, function);
4593  }
4594  }
4595  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4596  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4597  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4598  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 72, __pyx_L1_error)
4599  __Pyx_GOTREF(__pyx_t_7);
4600  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4601  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 72, __pyx_L1_error)
4602  __Pyx_GIVEREF(__pyx_t_7);
4603  __Pyx_GOTREF(__pyx_v_self->U_KNOT);
4604  __Pyx_DECREF(((PyObject *)__pyx_v_self->U_KNOT));
4605  __pyx_v_self->U_KNOT = ((PyArrayObject *)__pyx_t_7);
4606  __pyx_t_7 = 0;
4607 
4608  /* "cmeshTools.pyx":71
4609  * else:
4610  * self.weights = np.empty(0)
4611  * if self.mesh.U_KNOT != NULL: # <<<<<<<<<<<<<<
4612  * self.U_KNOT = np.asarray(<double[:self.mesh.nx+self.mesh.px+1]> self.mesh.U_KNOT)
4613  * else:
4614  */
4615  goto __pyx_L8;
4616  }
4617 
4618  /* "cmeshTools.pyx":74
4619  * self.U_KNOT = np.asarray(<double[:self.mesh.nx+self.mesh.px+1]> self.mesh.U_KNOT)
4620  * else:
4621  * self.U_KNOT = np.empty(0) # <<<<<<<<<<<<<<
4622  * if self.mesh.V_KNOT != NULL:
4623  * self.V_KNOT = np.asarray(<double[:self.mesh.ny+self.mesh.py+1]> self.mesh.V_KNOT)
4624  */
4625  /*else*/ {
4626  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 74, __pyx_L1_error)
4627  __Pyx_GOTREF(__pyx_t_3);
4628  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 74, __pyx_L1_error)
4629  __Pyx_GOTREF(__pyx_t_2);
4630  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4631  __pyx_t_3 = NULL;
4632  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4633  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4634  if (likely(__pyx_t_3)) {
4635  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4636  __Pyx_INCREF(__pyx_t_3);
4637  __Pyx_INCREF(function);
4638  __Pyx_DECREF_SET(__pyx_t_2, function);
4639  }
4640  }
4641  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_0);
4642  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4643  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 74, __pyx_L1_error)
4644  __Pyx_GOTREF(__pyx_t_7);
4645  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4646  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 74, __pyx_L1_error)
4647  __Pyx_GIVEREF(__pyx_t_7);
4648  __Pyx_GOTREF(__pyx_v_self->U_KNOT);
4649  __Pyx_DECREF(((PyObject *)__pyx_v_self->U_KNOT));
4650  __pyx_v_self->U_KNOT = ((PyArrayObject *)__pyx_t_7);
4651  __pyx_t_7 = 0;
4652  }
4653  __pyx_L8:;
4654 
4655  /* "cmeshTools.pyx":75
4656  * else:
4657  * self.U_KNOT = np.empty(0)
4658  * if self.mesh.V_KNOT != NULL: # <<<<<<<<<<<<<<
4659  * self.V_KNOT = np.asarray(<double[:self.mesh.ny+self.mesh.py+1]> self.mesh.V_KNOT)
4660  * else:
4661  */
4662  __pyx_t_8 = ((__pyx_v_self->mesh.V_KNOT != NULL) != 0);
4663  if (__pyx_t_8) {
4664 
4665  /* "cmeshTools.pyx":76
4666  * self.U_KNOT = np.empty(0)
4667  * if self.mesh.V_KNOT != NULL:
4668  * self.V_KNOT = np.asarray(<double[:self.mesh.ny+self.mesh.py+1]> self.mesh.V_KNOT) # <<<<<<<<<<<<<<
4669  * else:
4670  * self.V_KNOT = np.empty(0)
4671  */
4672  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 76, __pyx_L1_error)
4673  __Pyx_GOTREF(__pyx_t_2);
4674  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 76, __pyx_L1_error)
4675  __Pyx_GOTREF(__pyx_t_3);
4676  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4677  __pyx_t_9 = __pyx_v_self->mesh.V_KNOT;
4678  if (!__pyx_t_9) {
4679  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4680  __PYX_ERR(1, 76, __pyx_L1_error)
4681  }
4682  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
4683  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)((__pyx_v_self->mesh.ny + __pyx_v_self->mesh.py) + 1)));
4684  if (unlikely(!__pyx_t_4 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 76, __pyx_L1_error)
4685  __Pyx_GOTREF(__pyx_t_4);
4686  __Pyx_GOTREF(__pyx_t_2);
4687  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_9);
4688  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 76, __pyx_L1_error)
4689  __Pyx_GOTREF(__pyx_t_6);
4690  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4691  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4692  __pyx_t_4 = NULL;
4693  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4694  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4695  if (likely(__pyx_t_4)) {
4696  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4697  __Pyx_INCREF(__pyx_t_4);
4698  __Pyx_INCREF(function);
4699  __Pyx_DECREF_SET(__pyx_t_3, function);
4700  }
4701  }
4702  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4703  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4704  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4705  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 76, __pyx_L1_error)
4706  __Pyx_GOTREF(__pyx_t_7);
4707  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4708  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 76, __pyx_L1_error)
4709  __Pyx_GIVEREF(__pyx_t_7);
4710  __Pyx_GOTREF(__pyx_v_self->V_KNOT);
4711  __Pyx_DECREF(((PyObject *)__pyx_v_self->V_KNOT));
4712  __pyx_v_self->V_KNOT = ((PyArrayObject *)__pyx_t_7);
4713  __pyx_t_7 = 0;
4714 
4715  /* "cmeshTools.pyx":75
4716  * else:
4717  * self.U_KNOT = np.empty(0)
4718  * if self.mesh.V_KNOT != NULL: # <<<<<<<<<<<<<<
4719  * self.V_KNOT = np.asarray(<double[:self.mesh.ny+self.mesh.py+1]> self.mesh.V_KNOT)
4720  * else:
4721  */
4722  goto __pyx_L9;
4723  }
4724 
4725  /* "cmeshTools.pyx":78
4726  * self.V_KNOT = np.asarray(<double[:self.mesh.ny+self.mesh.py+1]> self.mesh.V_KNOT)
4727  * else:
4728  * self.V_KNOT = np.empty(0) # <<<<<<<<<<<<<<
4729  * if self.mesh.W_KNOT != NULL:
4730  * self.W_KNOT = np.asarray(<double[:self.mesh.nz+self.mesh.pz+1]> self.mesh.W_KNOT)
4731  */
4732  /*else*/ {
4733  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 78, __pyx_L1_error)
4734  __Pyx_GOTREF(__pyx_t_3);
4735  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 78, __pyx_L1_error)
4736  __Pyx_GOTREF(__pyx_t_4);
4737  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4738  __pyx_t_3 = NULL;
4739  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4740  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
4741  if (likely(__pyx_t_3)) {
4742  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4743  __Pyx_INCREF(__pyx_t_3);
4744  __Pyx_INCREF(function);
4745  __Pyx_DECREF_SET(__pyx_t_4, function);
4746  }
4747  }
4748  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_int_0);
4749  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4750  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 78, __pyx_L1_error)
4751  __Pyx_GOTREF(__pyx_t_7);
4752  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4753  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 78, __pyx_L1_error)
4754  __Pyx_GIVEREF(__pyx_t_7);
4755  __Pyx_GOTREF(__pyx_v_self->V_KNOT);
4756  __Pyx_DECREF(((PyObject *)__pyx_v_self->V_KNOT));
4757  __pyx_v_self->V_KNOT = ((PyArrayObject *)__pyx_t_7);
4758  __pyx_t_7 = 0;
4759  }
4760  __pyx_L9:;
4761 
4762  /* "cmeshTools.pyx":79
4763  * else:
4764  * self.V_KNOT = np.empty(0)
4765  * if self.mesh.W_KNOT != NULL: # <<<<<<<<<<<<<<
4766  * self.W_KNOT = np.asarray(<double[:self.mesh.nz+self.mesh.pz+1]> self.mesh.W_KNOT)
4767  * else:
4768  */
4769  __pyx_t_8 = ((__pyx_v_self->mesh.W_KNOT != NULL) != 0);
4770  if (__pyx_t_8) {
4771 
4772  /* "cmeshTools.pyx":80
4773  * self.V_KNOT = np.empty(0)
4774  * if self.mesh.W_KNOT != NULL:
4775  * self.W_KNOT = np.asarray(<double[:self.mesh.nz+self.mesh.pz+1]> self.mesh.W_KNOT) # <<<<<<<<<<<<<<
4776  * else:
4777  * self.W_KNOT = np.empty(0)
4778  */
4779  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 80, __pyx_L1_error)
4780  __Pyx_GOTREF(__pyx_t_4);
4781  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 80, __pyx_L1_error)
4782  __Pyx_GOTREF(__pyx_t_3);
4783  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4784  __pyx_t_9 = __pyx_v_self->mesh.W_KNOT;
4785  if (!__pyx_t_9) {
4786  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4787  __PYX_ERR(1, 80, __pyx_L1_error)
4788  }
4789  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
4790  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)((__pyx_v_self->mesh.nz + __pyx_v_self->mesh.pz) + 1)));
4791  if (unlikely(!__pyx_t_2 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_2))) __PYX_ERR(1, 80, __pyx_L1_error)
4792  __Pyx_GOTREF(__pyx_t_2);
4793  __Pyx_GOTREF(__pyx_t_4);
4794  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(double), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_9);
4795  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 80, __pyx_L1_error)
4796  __Pyx_GOTREF(__pyx_t_6);
4797  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4798  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4799  __pyx_t_2 = NULL;
4800  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4801  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
4802  if (likely(__pyx_t_2)) {
4803  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4804  __Pyx_INCREF(__pyx_t_2);
4805  __Pyx_INCREF(function);
4806  __Pyx_DECREF_SET(__pyx_t_3, function);
4807  }
4808  }
4809  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4810  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4811  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4812  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 80, __pyx_L1_error)
4813  __Pyx_GOTREF(__pyx_t_7);
4814  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4815  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 80, __pyx_L1_error)
4816  __Pyx_GIVEREF(__pyx_t_7);
4817  __Pyx_GOTREF(__pyx_v_self->W_KNOT);
4818  __Pyx_DECREF(((PyObject *)__pyx_v_self->W_KNOT));
4819  __pyx_v_self->W_KNOT = ((PyArrayObject *)__pyx_t_7);
4820  __pyx_t_7 = 0;
4821 
4822  /* "cmeshTools.pyx":79
4823  * else:
4824  * self.V_KNOT = np.empty(0)
4825  * if self.mesh.W_KNOT != NULL: # <<<<<<<<<<<<<<
4826  * self.W_KNOT = np.asarray(<double[:self.mesh.nz+self.mesh.pz+1]> self.mesh.W_KNOT)
4827  * else:
4828  */
4829  goto __pyx_L10;
4830  }
4831 
4832  /* "cmeshTools.pyx":82
4833  * self.W_KNOT = np.asarray(<double[:self.mesh.nz+self.mesh.pz+1]> self.mesh.W_KNOT)
4834  * else:
4835  * self.W_KNOT = np.empty(0) # <<<<<<<<<<<<<<
4836  * self.elementDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementDiametersArray)
4837  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray)
4838  */
4839  /*else*/ {
4840  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 82, __pyx_L1_error)
4841  __Pyx_GOTREF(__pyx_t_3);
4842  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 82, __pyx_L1_error)
4843  __Pyx_GOTREF(__pyx_t_2);
4844  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4845  __pyx_t_3 = NULL;
4846  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4847  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4848  if (likely(__pyx_t_3)) {
4849  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
4850  __Pyx_INCREF(__pyx_t_3);
4851  __Pyx_INCREF(function);
4852  __Pyx_DECREF_SET(__pyx_t_2, function);
4853  }
4854  }
4855  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_int_0);
4856  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4857  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 82, __pyx_L1_error)
4858  __Pyx_GOTREF(__pyx_t_7);
4859  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4860  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 82, __pyx_L1_error)
4861  __Pyx_GIVEREF(__pyx_t_7);
4862  __Pyx_GOTREF(__pyx_v_self->W_KNOT);
4863  __Pyx_DECREF(((PyObject *)__pyx_v_self->W_KNOT));
4864  __pyx_v_self->W_KNOT = ((PyArrayObject *)__pyx_t_7);
4865  __pyx_t_7 = 0;
4866  }
4867  __pyx_L10:;
4868 
4869  /* "cmeshTools.pyx":83
4870  * else:
4871  * self.W_KNOT = np.empty(0)
4872  * self.elementDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementDiametersArray) # <<<<<<<<<<<<<<
4873  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray)
4874  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray)
4875  */
4876  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 83, __pyx_L1_error)
4877  __Pyx_GOTREF(__pyx_t_2);
4878  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 83, __pyx_L1_error)
4879  __Pyx_GOTREF(__pyx_t_3);
4880  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4881  __pyx_t_9 = __pyx_v_self->mesh.elementDiametersArray;
4882  if (!__pyx_t_9) {
4883  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4884  __PYX_ERR(1, 83, __pyx_L1_error)
4885  }
4886  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
4887  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global));
4888  if (unlikely(!__pyx_t_4 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 83, __pyx_L1_error)
4889  __Pyx_GOTREF(__pyx_t_4);
4890  __Pyx_GOTREF(__pyx_t_2);
4891  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_9);
4892  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 83, __pyx_L1_error)
4893  __Pyx_GOTREF(__pyx_t_6);
4894  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4895  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4896  __pyx_t_4 = NULL;
4897  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
4898  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
4899  if (likely(__pyx_t_4)) {
4900  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
4901  __Pyx_INCREF(__pyx_t_4);
4902  __Pyx_INCREF(function);
4903  __Pyx_DECREF_SET(__pyx_t_3, function);
4904  }
4905  }
4906  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
4907  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4908  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4909  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 83, __pyx_L1_error)
4910  __Pyx_GOTREF(__pyx_t_7);
4911  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4912  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 83, __pyx_L1_error)
4913  __Pyx_GIVEREF(__pyx_t_7);
4914  __Pyx_GOTREF(__pyx_v_self->elementDiametersArray);
4915  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementDiametersArray));
4916  __pyx_v_self->elementDiametersArray = ((PyArrayObject *)__pyx_t_7);
4917  __pyx_t_7 = 0;
4918 
4919  /* "cmeshTools.pyx":84
4920  * self.W_KNOT = np.empty(0)
4921  * self.elementDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementDiametersArray)
4922  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray) # <<<<<<<<<<<<<<
4923  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray)
4924  * if self.mesh.elementBarycentersArray:
4925  */
4926  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 84, __pyx_L1_error)
4927  __Pyx_GOTREF(__pyx_t_3);
4928  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 84, __pyx_L1_error)
4929  __Pyx_GOTREF(__pyx_t_4);
4930  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4931  __pyx_t_9 = __pyx_v_self->mesh.elementInnerDiametersArray;
4932  if (!__pyx_t_9) {
4933  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4934  __PYX_ERR(1, 84, __pyx_L1_error)
4935  }
4936  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
4937  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global));
4938  if (unlikely(!__pyx_t_2 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_2))) __PYX_ERR(1, 84, __pyx_L1_error)
4939  __Pyx_GOTREF(__pyx_t_2);
4940  __Pyx_GOTREF(__pyx_t_3);
4941  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(double), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_9);
4942  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 84, __pyx_L1_error)
4943  __Pyx_GOTREF(__pyx_t_6);
4944  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4945  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
4946  __pyx_t_2 = NULL;
4947  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
4948  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
4949  if (likely(__pyx_t_2)) {
4950  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
4951  __Pyx_INCREF(__pyx_t_2);
4952  __Pyx_INCREF(function);
4953  __Pyx_DECREF_SET(__pyx_t_4, function);
4954  }
4955  }
4956  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
4957  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
4958  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
4959  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 84, __pyx_L1_error)
4960  __Pyx_GOTREF(__pyx_t_7);
4961  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4962  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 84, __pyx_L1_error)
4963  __Pyx_GIVEREF(__pyx_t_7);
4964  __Pyx_GOTREF(__pyx_v_self->elementInnerDiametersArray);
4965  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementInnerDiametersArray));
4966  __pyx_v_self->elementInnerDiametersArray = ((PyArrayObject *)__pyx_t_7);
4967  __pyx_t_7 = 0;
4968 
4969  /* "cmeshTools.pyx":85
4970  * self.elementDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementDiametersArray)
4971  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray)
4972  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray) # <<<<<<<<<<<<<<
4973  * if self.mesh.elementBarycentersArray:
4974  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
4975  */
4976  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 85, __pyx_L1_error)
4977  __Pyx_GOTREF(__pyx_t_4);
4978  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 85, __pyx_L1_error)
4979  __Pyx_GOTREF(__pyx_t_2);
4980  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4981  __pyx_t_9 = __pyx_v_self->mesh.elementBoundaryDiametersArray;
4982  if (!__pyx_t_9) {
4983  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
4984  __PYX_ERR(1, 85, __pyx_L1_error)
4985  }
4986  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
4987  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global));
4988  if (unlikely(!__pyx_t_3 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(1, 85, __pyx_L1_error)
4989  __Pyx_GOTREF(__pyx_t_3);
4990  __Pyx_GOTREF(__pyx_t_4);
4991  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(double), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_9);
4992  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 85, __pyx_L1_error)
4993  __Pyx_GOTREF(__pyx_t_6);
4994  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4995  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4996  __pyx_t_3 = NULL;
4997  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
4998  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
4999  if (likely(__pyx_t_3)) {
5000  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5001  __Pyx_INCREF(__pyx_t_3);
5002  __Pyx_INCREF(function);
5003  __Pyx_DECREF_SET(__pyx_t_2, function);
5004  }
5005  }
5006  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
5007  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5008  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5009  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 85, __pyx_L1_error)
5010  __Pyx_GOTREF(__pyx_t_7);
5011  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5012  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 85, __pyx_L1_error)
5013  __Pyx_GIVEREF(__pyx_t_7);
5014  __Pyx_GOTREF(__pyx_v_self->elementBoundaryDiametersArray);
5015  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryDiametersArray));
5016  __pyx_v_self->elementBoundaryDiametersArray = ((PyArrayObject *)__pyx_t_7);
5017  __pyx_t_7 = 0;
5018 
5019  /* "cmeshTools.pyx":86
5020  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray)
5021  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray)
5022  * if self.mesh.elementBarycentersArray: # <<<<<<<<<<<<<<
5023  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5024  * if self.mesh.elementBoundaryBarycentersArray:
5025  */
5026  __pyx_t_8 = (__pyx_v_self->mesh.elementBarycentersArray != 0);
5027  if (__pyx_t_8) {
5028 
5029  /* "cmeshTools.pyx":87
5030  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray)
5031  * if self.mesh.elementBarycentersArray:
5032  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray) # <<<<<<<<<<<<<<
5033  * if self.mesh.elementBoundaryBarycentersArray:
5034  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5035  */
5036  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 87, __pyx_L1_error)
5037  __Pyx_GOTREF(__pyx_t_2);
5038  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 87, __pyx_L1_error)
5039  __Pyx_GOTREF(__pyx_t_3);
5040  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5041  __pyx_t_9 = __pyx_v_self->mesh.elementBarycentersArray;
5042  if (!__pyx_t_9) {
5043  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
5044  __PYX_ERR(1, 87, __pyx_L1_error)
5045  }
5046  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
5047  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElements_global), ((Py_ssize_t)3));
5048  if (unlikely(!__pyx_t_4 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 87, __pyx_L1_error)
5049  __Pyx_GOTREF(__pyx_t_4);
5050  __Pyx_GOTREF(__pyx_t_2);
5051  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_9);
5052  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 87, __pyx_L1_error)
5053  __Pyx_GOTREF(__pyx_t_6);
5054  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5055  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5056  __pyx_t_4 = NULL;
5057  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5058  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
5059  if (likely(__pyx_t_4)) {
5060  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5061  __Pyx_INCREF(__pyx_t_4);
5062  __Pyx_INCREF(function);
5063  __Pyx_DECREF_SET(__pyx_t_3, function);
5064  }
5065  }
5066  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
5067  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5068  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5069  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 87, __pyx_L1_error)
5070  __Pyx_GOTREF(__pyx_t_7);
5071  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5072  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 87, __pyx_L1_error)
5073  __Pyx_GIVEREF(__pyx_t_7);
5074  __Pyx_GOTREF(__pyx_v_self->elementBarycentersArray);
5075  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBarycentersArray));
5076  __pyx_v_self->elementBarycentersArray = ((PyArrayObject *)__pyx_t_7);
5077  __pyx_t_7 = 0;
5078 
5079  /* "cmeshTools.pyx":86
5080  * self.elementInnerDiametersArray = np.asarray(<double[:self.mesh.nElements_global]> self.mesh.elementInnerDiametersArray)
5081  * self.elementBoundaryDiametersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global]> self.mesh.elementBoundaryDiametersArray)
5082  * if self.mesh.elementBarycentersArray: # <<<<<<<<<<<<<<
5083  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5084  * if self.mesh.elementBoundaryBarycentersArray:
5085  */
5086  }
5087 
5088  /* "cmeshTools.pyx":88
5089  * if self.mesh.elementBarycentersArray:
5090  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5091  * if self.mesh.elementBoundaryBarycentersArray: # <<<<<<<<<<<<<<
5092  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5093  * if self.mesh.nodeDiametersArray:
5094  */
5095  __pyx_t_8 = (__pyx_v_self->mesh.elementBoundaryBarycentersArray != 0);
5096  if (__pyx_t_8) {
5097 
5098  /* "cmeshTools.pyx":89
5099  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5100  * if self.mesh.elementBoundaryBarycentersArray:
5101  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray) # <<<<<<<<<<<<<<
5102  * if self.mesh.nodeDiametersArray:
5103  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5104  */
5105  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 89, __pyx_L1_error)
5106  __Pyx_GOTREF(__pyx_t_3);
5107  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_asarray); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 89, __pyx_L1_error)
5108  __Pyx_GOTREF(__pyx_t_4);
5109  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5110  __pyx_t_9 = __pyx_v_self->mesh.elementBoundaryBarycentersArray;
5111  if (!__pyx_t_9) {
5112  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
5113  __PYX_ERR(1, 89, __pyx_L1_error)
5114  }
5115  __pyx_t_2 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
5116  __pyx_t_3 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nElementBoundaries_global), ((Py_ssize_t)3));
5117  if (unlikely(!__pyx_t_2 || !__pyx_t_3 || !PyBytes_AsString(__pyx_t_2))) __PYX_ERR(1, 89, __pyx_L1_error)
5118  __Pyx_GOTREF(__pyx_t_2);
5119  __Pyx_GOTREF(__pyx_t_3);
5120  __pyx_t_6 = __pyx_array_new(__pyx_t_3, sizeof(double), PyBytes_AS_STRING(__pyx_t_2), (char *) "c", (char *) __pyx_t_9);
5121  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 89, __pyx_L1_error)
5122  __Pyx_GOTREF(__pyx_t_6);
5123  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5124  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5125  __pyx_t_2 = NULL;
5126  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
5127  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
5128  if (likely(__pyx_t_2)) {
5129  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
5130  __Pyx_INCREF(__pyx_t_2);
5131  __Pyx_INCREF(function);
5132  __Pyx_DECREF_SET(__pyx_t_4, function);
5133  }
5134  }
5135  __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_t_6));
5136  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
5137  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5138  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 89, __pyx_L1_error)
5139  __Pyx_GOTREF(__pyx_t_7);
5140  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5141  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 89, __pyx_L1_error)
5142  __Pyx_GIVEREF(__pyx_t_7);
5143  __Pyx_GOTREF(__pyx_v_self->elementBoundaryBarycentersArray);
5144  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryBarycentersArray));
5145  __pyx_v_self->elementBoundaryBarycentersArray = ((PyArrayObject *)__pyx_t_7);
5146  __pyx_t_7 = 0;
5147 
5148  /* "cmeshTools.pyx":88
5149  * if self.mesh.elementBarycentersArray:
5150  * self.elementBarycentersArray = np.asarray(<double[:self.mesh.nElements_global, :3]> self.mesh.elementBarycentersArray)
5151  * if self.mesh.elementBoundaryBarycentersArray: # <<<<<<<<<<<<<<
5152  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5153  * if self.mesh.nodeDiametersArray:
5154  */
5155  }
5156 
5157  /* "cmeshTools.pyx":90
5158  * if self.mesh.elementBoundaryBarycentersArray:
5159  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5160  * if self.mesh.nodeDiametersArray: # <<<<<<<<<<<<<<
5161  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5162  * if self.mesh.nodeSupportArray:
5163  */
5164  __pyx_t_8 = (__pyx_v_self->mesh.nodeDiametersArray != 0);
5165  if (__pyx_t_8) {
5166 
5167  /* "cmeshTools.pyx":91
5168  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5169  * if self.mesh.nodeDiametersArray:
5170  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray) # <<<<<<<<<<<<<<
5171  * if self.mesh.nodeSupportArray:
5172  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray)
5173  */
5174  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 91, __pyx_L1_error)
5175  __Pyx_GOTREF(__pyx_t_4);
5176  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_asarray); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 91, __pyx_L1_error)
5177  __Pyx_GOTREF(__pyx_t_2);
5178  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5179  __pyx_t_9 = __pyx_v_self->mesh.nodeDiametersArray;
5180  if (!__pyx_t_9) {
5181  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
5182  __PYX_ERR(1, 91, __pyx_L1_error)
5183  }
5184  __pyx_t_3 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
5185  __pyx_t_4 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nNodes_global));
5186  if (unlikely(!__pyx_t_3 || !__pyx_t_4 || !PyBytes_AsString(__pyx_t_3))) __PYX_ERR(1, 91, __pyx_L1_error)
5187  __Pyx_GOTREF(__pyx_t_3);
5188  __Pyx_GOTREF(__pyx_t_4);
5189  __pyx_t_6 = __pyx_array_new(__pyx_t_4, sizeof(double), PyBytes_AS_STRING(__pyx_t_3), (char *) "c", (char *) __pyx_t_9);
5190  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 91, __pyx_L1_error)
5191  __Pyx_GOTREF(__pyx_t_6);
5192  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5193  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5194  __pyx_t_3 = NULL;
5195  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
5196  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
5197  if (likely(__pyx_t_3)) {
5198  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
5199  __Pyx_INCREF(__pyx_t_3);
5200  __Pyx_INCREF(function);
5201  __Pyx_DECREF_SET(__pyx_t_2, function);
5202  }
5203  }
5204  __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_t_6));
5205  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
5206  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5207  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 91, __pyx_L1_error)
5208  __Pyx_GOTREF(__pyx_t_7);
5209  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5210  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 91, __pyx_L1_error)
5211  __Pyx_GIVEREF(__pyx_t_7);
5212  __Pyx_GOTREF(__pyx_v_self->nodeDiametersArray);
5213  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeDiametersArray));
5214  __pyx_v_self->nodeDiametersArray = ((PyArrayObject *)__pyx_t_7);
5215  __pyx_t_7 = 0;
5216 
5217  /* "cmeshTools.pyx":90
5218  * if self.mesh.elementBoundaryBarycentersArray:
5219  * self.elementBoundaryBarycentersArray = np.asarray(<double[:self.mesh.nElementBoundaries_global, :3]> self.mesh.elementBoundaryBarycentersArray)
5220  * if self.mesh.nodeDiametersArray: # <<<<<<<<<<<<<<
5221  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5222  * if self.mesh.nodeSupportArray:
5223  */
5224  }
5225 
5226  /* "cmeshTools.pyx":92
5227  * if self.mesh.nodeDiametersArray:
5228  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5229  * if self.mesh.nodeSupportArray: # <<<<<<<<<<<<<<
5230  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray)
5231  * self.h = self.mesh.h
5232  */
5233  __pyx_t_8 = (__pyx_v_self->mesh.nodeSupportArray != 0);
5234  if (__pyx_t_8) {
5235 
5236  /* "cmeshTools.pyx":93
5237  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5238  * if self.mesh.nodeSupportArray:
5239  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray) # <<<<<<<<<<<<<<
5240  * self.h = self.mesh.h
5241  * self.hMin = self.mesh.hMin
5242  */
5243  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 93, __pyx_L1_error)
5244  __Pyx_GOTREF(__pyx_t_2);
5245  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_asarray); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 93, __pyx_L1_error)
5246  __Pyx_GOTREF(__pyx_t_3);
5247  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5248  __pyx_t_9 = __pyx_v_self->mesh.nodeSupportArray;
5249  if (!__pyx_t_9) {
5250  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
5251  __PYX_ERR(1, 93, __pyx_L1_error)
5252  }
5253  __pyx_t_4 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_double);
5254  __pyx_t_2 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_self->mesh.nNodes_global));
5255  if (unlikely(!__pyx_t_4 || !__pyx_t_2 || !PyBytes_AsString(__pyx_t_4))) __PYX_ERR(1, 93, __pyx_L1_error)
5256  __Pyx_GOTREF(__pyx_t_4);
5257  __Pyx_GOTREF(__pyx_t_2);
5258  __pyx_t_6 = __pyx_array_new(__pyx_t_2, sizeof(double), PyBytes_AS_STRING(__pyx_t_4), (char *) "c", (char *) __pyx_t_9);
5259  if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 93, __pyx_L1_error)
5260  __Pyx_GOTREF(__pyx_t_6);
5261  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5262  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5263  __pyx_t_4 = NULL;
5264  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
5265  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
5266  if (likely(__pyx_t_4)) {
5267  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
5268  __Pyx_INCREF(__pyx_t_4);
5269  __Pyx_INCREF(function);
5270  __Pyx_DECREF_SET(__pyx_t_3, function);
5271  }
5272  }
5273  __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_t_6)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_t_6));
5274  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
5275  __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5276  if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 93, __pyx_L1_error)
5277  __Pyx_GOTREF(__pyx_t_7);
5278  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5279  if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(1, 93, __pyx_L1_error)
5280  __Pyx_GIVEREF(__pyx_t_7);
5281  __Pyx_GOTREF(__pyx_v_self->nodeSupportArray);
5282  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeSupportArray));
5283  __pyx_v_self->nodeSupportArray = ((PyArrayObject *)__pyx_t_7);
5284  __pyx_t_7 = 0;
5285 
5286  /* "cmeshTools.pyx":92
5287  * if self.mesh.nodeDiametersArray:
5288  * self.nodeDiametersArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeDiametersArray)
5289  * if self.mesh.nodeSupportArray: # <<<<<<<<<<<<<<
5290  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray)
5291  * self.h = self.mesh.h
5292  */
5293  }
5294 
5295  /* "cmeshTools.pyx":94
5296  * if self.mesh.nodeSupportArray:
5297  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray)
5298  * self.h = self.mesh.h # <<<<<<<<<<<<<<
5299  * self.hMin = self.mesh.hMin
5300  * self.sigmaMax = self.mesh.sigmaMax
5301  */
5302  __pyx_t_10 = __pyx_v_self->mesh.h;
5303  __pyx_v_self->h = __pyx_t_10;
5304 
5305  /* "cmeshTools.pyx":95
5306  * self.nodeSupportArray = np.asarray(<double[:self.mesh.nNodes_global]> self.mesh.nodeSupportArray)
5307  * self.h = self.mesh.h
5308  * self.hMin = self.mesh.hMin # <<<<<<<<<<<<<<
5309  * self.sigmaMax = self.mesh.sigmaMax
5310  * self.volume = self.mesh.volume
5311  */
5312  __pyx_t_10 = __pyx_v_self->mesh.hMin;
5313  __pyx_v_self->hMin = __pyx_t_10;
5314 
5315  /* "cmeshTools.pyx":96
5316  * self.h = self.mesh.h
5317  * self.hMin = self.mesh.hMin
5318  * self.sigmaMax = self.mesh.sigmaMax # <<<<<<<<<<<<<<
5319  * self.volume = self.mesh.volume
5320  *
5321  */
5322  __pyx_t_10 = __pyx_v_self->mesh.sigmaMax;
5323  __pyx_v_self->sigmaMax = __pyx_t_10;
5324 
5325  /* "cmeshTools.pyx":97
5326  * self.hMin = self.mesh.hMin
5327  * self.sigmaMax = self.mesh.sigmaMax
5328  * self.volume = self.mesh.volume # <<<<<<<<<<<<<<
5329  *
5330  * def buildPythonMeshInterfaceNoArrays(self):
5331  */
5332  __pyx_t_10 = __pyx_v_self->mesh.volume;
5333  __pyx_v_self->volume = __pyx_t_10;
5334 
5335  /* "cmeshTools.pyx":16
5336  * cppm.initializeMesh(self.mesh)
5337  *
5338  * def buildPythonMeshInterface(self): # <<<<<<<<<<<<<<
5339  * cdef int dim1
5340  * self.nElements_global = self.mesh.nElements_global
5341  */
5342 
5343  /* function exit code */
5344  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5345  goto __pyx_L0;
5346  __pyx_L1_error:;
5347  __Pyx_XDECREF(__pyx_t_2);
5348  __Pyx_XDECREF(__pyx_t_3);
5349  __Pyx_XDECREF(__pyx_t_4);
5350  __Pyx_XDECREF(((PyObject *)__pyx_t_6));
5351  __Pyx_XDECREF(__pyx_t_7);
5352  __Pyx_AddTraceback("cmeshTools.CMesh.buildPythonMeshInterface", __pyx_clineno, __pyx_lineno, __pyx_filename);
5353  __pyx_r = NULL;
5354  __pyx_L0:;
5355  __Pyx_XGIVEREF(__pyx_r);
5356  __Pyx_RefNannyFinishContext();
5357  return __pyx_r;
5358 }
5359 
5360 /* "cmeshTools.pyx":99
5361  * self.volume = self.mesh.volume
5362  *
5363  * def buildPythonMeshInterfaceNoArrays(self): # <<<<<<<<<<<<<<
5364  * cdef int dim1
5365  * self.nElements_global = self.mesh.nElements_global
5366  */
5367 
5368 /* Python wrapper */
5369 static PyObject *__pyx_pw_10cmeshTools_5CMesh_5buildPythonMeshInterfaceNoArrays(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5370 static PyObject *__pyx_pw_10cmeshTools_5CMesh_5buildPythonMeshInterfaceNoArrays(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5371  PyObject *__pyx_r = 0;
5372  __Pyx_RefNannyDeclarations
5373  __Pyx_RefNannySetupContext("buildPythonMeshInterfaceNoArrays (wrapper)", 0);
5374  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_4buildPythonMeshInterfaceNoArrays(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5375 
5376  /* function exit code */
5377  __Pyx_RefNannyFinishContext();
5378  return __pyx_r;
5379 }
5380 
5381 static PyObject *__pyx_pf_10cmeshTools_5CMesh_4buildPythonMeshInterfaceNoArrays(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5382  PyObject *__pyx_r = NULL;
5383  __Pyx_RefNannyDeclarations
5384  int __pyx_t_1;
5385  double __pyx_t_2;
5386  __Pyx_RefNannySetupContext("buildPythonMeshInterfaceNoArrays", 0);
5387 
5388  /* "cmeshTools.pyx":101
5389  * def buildPythonMeshInterfaceNoArrays(self):
5390  * cdef int dim1
5391  * self.nElements_global = self.mesh.nElements_global # <<<<<<<<<<<<<<
5392  * self.nNodes_global = self.mesh.nNodes_global
5393  * self.nNodes_element = self.mesh.nNodes_element
5394  */
5395  __pyx_t_1 = __pyx_v_self->mesh.nElements_global;
5396  __pyx_v_self->nElements_global = __pyx_t_1;
5397 
5398  /* "cmeshTools.pyx":102
5399  * cdef int dim1
5400  * self.nElements_global = self.mesh.nElements_global
5401  * self.nNodes_global = self.mesh.nNodes_global # <<<<<<<<<<<<<<
5402  * self.nNodes_element = self.mesh.nNodes_element
5403  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
5404  */
5405  __pyx_t_1 = __pyx_v_self->mesh.nNodes_global;
5406  __pyx_v_self->nNodes_global = __pyx_t_1;
5407 
5408  /* "cmeshTools.pyx":103
5409  * self.nElements_global = self.mesh.nElements_global
5410  * self.nNodes_global = self.mesh.nNodes_global
5411  * self.nNodes_element = self.mesh.nNodes_element # <<<<<<<<<<<<<<
5412  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
5413  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
5414  */
5415  __pyx_t_1 = __pyx_v_self->mesh.nNodes_element;
5416  __pyx_v_self->nNodes_element = __pyx_t_1;
5417 
5418  /* "cmeshTools.pyx":104
5419  * self.nNodes_global = self.mesh.nNodes_global
5420  * self.nNodes_element = self.mesh.nNodes_element
5421  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary # <<<<<<<<<<<<<<
5422  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
5423  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
5424  */
5425  __pyx_t_1 = __pyx_v_self->mesh.nNodes_elementBoundary;
5426  __pyx_v_self->nNodes_elementBoundary = __pyx_t_1;
5427 
5428  /* "cmeshTools.pyx":105
5429  * self.nNodes_element = self.mesh.nNodes_element
5430  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
5431  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element # <<<<<<<<<<<<<<
5432  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
5433  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
5434  */
5435  __pyx_t_1 = __pyx_v_self->mesh.nElementBoundaries_element;
5436  __pyx_v_self->nElementBoundaries_element = __pyx_t_1;
5437 
5438  /* "cmeshTools.pyx":106
5439  * self.nNodes_elementBoundary = self.mesh.nNodes_elementBoundary
5440  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
5441  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global # <<<<<<<<<<<<<<
5442  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
5443  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
5444  */
5445  __pyx_t_1 = __pyx_v_self->mesh.nElementBoundaries_global;
5446  __pyx_v_self->nElementBoundaries_global = __pyx_t_1;
5447 
5448  /* "cmeshTools.pyx":107
5449  * self.nElementBoundaries_element = self.mesh.nElementBoundaries_element
5450  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
5451  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global # <<<<<<<<<<<<<<
5452  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
5453  * self.max_nElements_node = self.mesh.max_nElements_node
5454  */
5455  __pyx_t_1 = __pyx_v_self->mesh.nInteriorElementBoundaries_global;
5456  __pyx_v_self->nInteriorElementBoundaries_global = __pyx_t_1;
5457 
5458  /* "cmeshTools.pyx":108
5459  * self.nElementBoundaries_global = self.mesh.nElementBoundaries_global
5460  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
5461  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global # <<<<<<<<<<<<<<
5462  * self.max_nElements_node = self.mesh.max_nElements_node
5463  * self.nEdges_global = self.mesh.nEdges_global
5464  */
5465  __pyx_t_1 = __pyx_v_self->mesh.nExteriorElementBoundaries_global;
5466  __pyx_v_self->nExteriorElementBoundaries_global = __pyx_t_1;
5467 
5468  /* "cmeshTools.pyx":109
5469  * self.nInteriorElementBoundaries_global = self.mesh.nInteriorElementBoundaries_global
5470  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
5471  * self.max_nElements_node = self.mesh.max_nElements_node # <<<<<<<<<<<<<<
5472  * self.nEdges_global = self.mesh.nEdges_global
5473  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
5474  */
5475  __pyx_t_1 = __pyx_v_self->mesh.max_nElements_node;
5476  __pyx_v_self->max_nElements_node = __pyx_t_1;
5477 
5478  /* "cmeshTools.pyx":110
5479  * self.nExteriorElementBoundaries_global = self.mesh.nExteriorElementBoundaries_global
5480  * self.max_nElements_node = self.mesh.max_nElements_node
5481  * self.nEdges_global = self.mesh.nEdges_global # <<<<<<<<<<<<<<
5482  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
5483  * self.h = self.mesh.h
5484  */
5485  __pyx_t_1 = __pyx_v_self->mesh.nEdges_global;
5486  __pyx_v_self->nEdges_global = __pyx_t_1;
5487 
5488  /* "cmeshTools.pyx":111
5489  * self.max_nElements_node = self.mesh.max_nElements_node
5490  * self.nEdges_global = self.mesh.nEdges_global
5491  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node # <<<<<<<<<<<<<<
5492  * self.h = self.mesh.h
5493  * self.hMin = self.mesh.hMin
5494  */
5495  __pyx_t_1 = __pyx_v_self->mesh.max_nNodeNeighbors_node;
5496  __pyx_v_self->max_nNodeNeighbors_node = __pyx_t_1;
5497 
5498  /* "cmeshTools.pyx":112
5499  * self.nEdges_global = self.mesh.nEdges_global
5500  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
5501  * self.h = self.mesh.h # <<<<<<<<<<<<<<
5502  * self.hMin = self.mesh.hMin
5503  * self.sigmaMax = self.mesh.sigmaMax
5504  */
5505  __pyx_t_2 = __pyx_v_self->mesh.h;
5506  __pyx_v_self->h = __pyx_t_2;
5507 
5508  /* "cmeshTools.pyx":113
5509  * self.max_nNodeNeighbors_node = self.mesh.max_nNodeNeighbors_node
5510  * self.h = self.mesh.h
5511  * self.hMin = self.mesh.hMin # <<<<<<<<<<<<<<
5512  * self.sigmaMax = self.mesh.sigmaMax
5513  * self.volume = self.mesh.volume
5514  */
5515  __pyx_t_2 = __pyx_v_self->mesh.hMin;
5516  __pyx_v_self->hMin = __pyx_t_2;
5517 
5518  /* "cmeshTools.pyx":114
5519  * self.h = self.mesh.h
5520  * self.hMin = self.mesh.hMin
5521  * self.sigmaMax = self.mesh.sigmaMax # <<<<<<<<<<<<<<
5522  * self.volume = self.mesh.volume
5523  *
5524  */
5525  __pyx_t_2 = __pyx_v_self->mesh.sigmaMax;
5526  __pyx_v_self->sigmaMax = __pyx_t_2;
5527 
5528  /* "cmeshTools.pyx":115
5529  * self.hMin = self.mesh.hMin
5530  * self.sigmaMax = self.mesh.sigmaMax
5531  * self.volume = self.mesh.volume # <<<<<<<<<<<<<<
5532  *
5533  * def buildPythonMeshInterface(cmesh):
5534  */
5535  __pyx_t_2 = __pyx_v_self->mesh.volume;
5536  __pyx_v_self->volume = __pyx_t_2;
5537 
5538  /* "cmeshTools.pyx":99
5539  * self.volume = self.mesh.volume
5540  *
5541  * def buildPythonMeshInterfaceNoArrays(self): # <<<<<<<<<<<<<<
5542  * cdef int dim1
5543  * self.nElements_global = self.mesh.nElements_global
5544  */
5545 
5546  /* function exit code */
5547  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5548  __Pyx_XGIVEREF(__pyx_r);
5549  __Pyx_RefNannyFinishContext();
5550  return __pyx_r;
5551 }
5552 
5553 /* "cmeshTools.pxd":8
5554  * cdef cppm.Mesh mesh
5555  * cdef public:
5556  * cdef int nElements_global # <<<<<<<<<<<<<<
5557  * cdef int nNodes_global
5558  * cdef int nNodes_element
5559  */
5560 
5561 /* Python wrapper */
5562 static PyObject *__pyx_pw_10cmeshTools_5CMesh_16nElements_global_1__get__(PyObject *__pyx_v_self); /*proto*/
5563 static PyObject *__pyx_pw_10cmeshTools_5CMesh_16nElements_global_1__get__(PyObject *__pyx_v_self) {
5564  PyObject *__pyx_r = 0;
5565  __Pyx_RefNannyDeclarations
5566  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5567  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_16nElements_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5568 
5569  /* function exit code */
5570  __Pyx_RefNannyFinishContext();
5571  return __pyx_r;
5572 }
5573 
5574 static PyObject *__pyx_pf_10cmeshTools_5CMesh_16nElements_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5575  PyObject *__pyx_r = NULL;
5576  __Pyx_RefNannyDeclarations
5577  PyObject *__pyx_t_1 = NULL;
5578  __Pyx_RefNannySetupContext("__get__", 0);
5579  __Pyx_XDECREF(__pyx_r);
5580  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error)
5581  __Pyx_GOTREF(__pyx_t_1);
5582  __pyx_r = __pyx_t_1;
5583  __pyx_t_1 = 0;
5584  goto __pyx_L0;
5585 
5586  /* function exit code */
5587  __pyx_L1_error:;
5588  __Pyx_XDECREF(__pyx_t_1);
5589  __Pyx_AddTraceback("cmeshTools.CMesh.nElements_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5590  __pyx_r = NULL;
5591  __pyx_L0:;
5592  __Pyx_XGIVEREF(__pyx_r);
5593  __Pyx_RefNannyFinishContext();
5594  return __pyx_r;
5595 }
5596 
5597 /* Python wrapper */
5598 static int __pyx_pw_10cmeshTools_5CMesh_16nElements_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5599 static int __pyx_pw_10cmeshTools_5CMesh_16nElements_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5600  int __pyx_r;
5601  __Pyx_RefNannyDeclarations
5602  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5603  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_16nElements_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5604 
5605  /* function exit code */
5606  __Pyx_RefNannyFinishContext();
5607  return __pyx_r;
5608 }
5609 
5610 static int __pyx_pf_10cmeshTools_5CMesh_16nElements_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
5611  int __pyx_r;
5612  __Pyx_RefNannyDeclarations
5613  int __pyx_t_1;
5614  __Pyx_RefNannySetupContext("__set__", 0);
5615  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 8, __pyx_L1_error)
5616  __pyx_v_self->nElements_global = __pyx_t_1;
5617 
5618  /* function exit code */
5619  __pyx_r = 0;
5620  goto __pyx_L0;
5621  __pyx_L1_error:;
5622  __Pyx_AddTraceback("cmeshTools.CMesh.nElements_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5623  __pyx_r = -1;
5624  __pyx_L0:;
5625  __Pyx_RefNannyFinishContext();
5626  return __pyx_r;
5627 }
5628 
5629 /* "cmeshTools.pxd":9
5630  * cdef public:
5631  * cdef int nElements_global
5632  * cdef int nNodes_global # <<<<<<<<<<<<<<
5633  * cdef int nNodes_element
5634  * cdef int nNodes_elementBoundary
5635  */
5636 
5637 /* Python wrapper */
5638 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nNodes_global_1__get__(PyObject *__pyx_v_self); /*proto*/
5639 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nNodes_global_1__get__(PyObject *__pyx_v_self) {
5640  PyObject *__pyx_r = 0;
5641  __Pyx_RefNannyDeclarations
5642  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5643  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nNodes_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5644 
5645  /* function exit code */
5646  __Pyx_RefNannyFinishContext();
5647  return __pyx_r;
5648 }
5649 
5650 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nNodes_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5651  PyObject *__pyx_r = NULL;
5652  __Pyx_RefNannyDeclarations
5653  PyObject *__pyx_t_1 = NULL;
5654  __Pyx_RefNannySetupContext("__get__", 0);
5655  __Pyx_XDECREF(__pyx_r);
5656  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nNodes_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error)
5657  __Pyx_GOTREF(__pyx_t_1);
5658  __pyx_r = __pyx_t_1;
5659  __pyx_t_1 = 0;
5660  goto __pyx_L0;
5661 
5662  /* function exit code */
5663  __pyx_L1_error:;
5664  __Pyx_XDECREF(__pyx_t_1);
5665  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5666  __pyx_r = NULL;
5667  __pyx_L0:;
5668  __Pyx_XGIVEREF(__pyx_r);
5669  __Pyx_RefNannyFinishContext();
5670  return __pyx_r;
5671 }
5672 
5673 /* Python wrapper */
5674 static int __pyx_pw_10cmeshTools_5CMesh_13nNodes_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5675 static int __pyx_pw_10cmeshTools_5CMesh_13nNodes_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5676  int __pyx_r;
5677  __Pyx_RefNannyDeclarations
5678  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5679  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nNodes_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5680 
5681  /* function exit code */
5682  __Pyx_RefNannyFinishContext();
5683  return __pyx_r;
5684 }
5685 
5686 static int __pyx_pf_10cmeshTools_5CMesh_13nNodes_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
5687  int __pyx_r;
5688  __Pyx_RefNannyDeclarations
5689  int __pyx_t_1;
5690  __Pyx_RefNannySetupContext("__set__", 0);
5691  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 9, __pyx_L1_error)
5692  __pyx_v_self->nNodes_global = __pyx_t_1;
5693 
5694  /* function exit code */
5695  __pyx_r = 0;
5696  goto __pyx_L0;
5697  __pyx_L1_error:;
5698  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5699  __pyx_r = -1;
5700  __pyx_L0:;
5701  __Pyx_RefNannyFinishContext();
5702  return __pyx_r;
5703 }
5704 
5705 /* "cmeshTools.pxd":10
5706  * cdef int nElements_global
5707  * cdef int nNodes_global
5708  * cdef int nNodes_element # <<<<<<<<<<<<<<
5709  * cdef int nNodes_elementBoundary
5710  * cdef int nElementBoundaries_element,
5711  */
5712 
5713 /* Python wrapper */
5714 static PyObject *__pyx_pw_10cmeshTools_5CMesh_14nNodes_element_1__get__(PyObject *__pyx_v_self); /*proto*/
5715 static PyObject *__pyx_pw_10cmeshTools_5CMesh_14nNodes_element_1__get__(PyObject *__pyx_v_self) {
5716  PyObject *__pyx_r = 0;
5717  __Pyx_RefNannyDeclarations
5718  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5719  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_14nNodes_element___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5720 
5721  /* function exit code */
5722  __Pyx_RefNannyFinishContext();
5723  return __pyx_r;
5724 }
5725 
5726 static PyObject *__pyx_pf_10cmeshTools_5CMesh_14nNodes_element___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5727  PyObject *__pyx_r = NULL;
5728  __Pyx_RefNannyDeclarations
5729  PyObject *__pyx_t_1 = NULL;
5730  __Pyx_RefNannySetupContext("__get__", 0);
5731  __Pyx_XDECREF(__pyx_r);
5732  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nNodes_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error)
5733  __Pyx_GOTREF(__pyx_t_1);
5734  __pyx_r = __pyx_t_1;
5735  __pyx_t_1 = 0;
5736  goto __pyx_L0;
5737 
5738  /* function exit code */
5739  __pyx_L1_error:;
5740  __Pyx_XDECREF(__pyx_t_1);
5741  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_element.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5742  __pyx_r = NULL;
5743  __pyx_L0:;
5744  __Pyx_XGIVEREF(__pyx_r);
5745  __Pyx_RefNannyFinishContext();
5746  return __pyx_r;
5747 }
5748 
5749 /* Python wrapper */
5750 static int __pyx_pw_10cmeshTools_5CMesh_14nNodes_element_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5751 static int __pyx_pw_10cmeshTools_5CMesh_14nNodes_element_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5752  int __pyx_r;
5753  __Pyx_RefNannyDeclarations
5754  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5755  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_14nNodes_element_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5756 
5757  /* function exit code */
5758  __Pyx_RefNannyFinishContext();
5759  return __pyx_r;
5760 }
5761 
5762 static int __pyx_pf_10cmeshTools_5CMesh_14nNodes_element_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
5763  int __pyx_r;
5764  __Pyx_RefNannyDeclarations
5765  int __pyx_t_1;
5766  __Pyx_RefNannySetupContext("__set__", 0);
5767  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error)
5768  __pyx_v_self->nNodes_element = __pyx_t_1;
5769 
5770  /* function exit code */
5771  __pyx_r = 0;
5772  goto __pyx_L0;
5773  __pyx_L1_error:;
5774  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_element.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5775  __pyx_r = -1;
5776  __pyx_L0:;
5777  __Pyx_RefNannyFinishContext();
5778  return __pyx_r;
5779 }
5780 
5781 /* "cmeshTools.pxd":11
5782  * cdef int nNodes_global
5783  * cdef int nNodes_element
5784  * cdef int nNodes_elementBoundary # <<<<<<<<<<<<<<
5785  * cdef int nElementBoundaries_element,
5786  * cdef int nElementBoundaries_global,
5787  */
5788 
5789 /* Python wrapper */
5790 static PyObject *__pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_1__get__(PyObject *__pyx_v_self); /*proto*/
5791 static PyObject *__pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_1__get__(PyObject *__pyx_v_self) {
5792  PyObject *__pyx_r = 0;
5793  __Pyx_RefNannyDeclarations
5794  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5795  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5796 
5797  /* function exit code */
5798  __Pyx_RefNannyFinishContext();
5799  return __pyx_r;
5800 }
5801 
5802 static PyObject *__pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5803  PyObject *__pyx_r = NULL;
5804  __Pyx_RefNannyDeclarations
5805  PyObject *__pyx_t_1 = NULL;
5806  __Pyx_RefNannySetupContext("__get__", 0);
5807  __Pyx_XDECREF(__pyx_r);
5808  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nNodes_elementBoundary); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error)
5809  __Pyx_GOTREF(__pyx_t_1);
5810  __pyx_r = __pyx_t_1;
5811  __pyx_t_1 = 0;
5812  goto __pyx_L0;
5813 
5814  /* function exit code */
5815  __pyx_L1_error:;
5816  __Pyx_XDECREF(__pyx_t_1);
5817  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_elementBoundary.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5818  __pyx_r = NULL;
5819  __pyx_L0:;
5820  __Pyx_XGIVEREF(__pyx_r);
5821  __Pyx_RefNannyFinishContext();
5822  return __pyx_r;
5823 }
5824 
5825 /* Python wrapper */
5826 static int __pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5827 static int __pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5828  int __pyx_r;
5829  __Pyx_RefNannyDeclarations
5830  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5831  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5832 
5833  /* function exit code */
5834  __Pyx_RefNannyFinishContext();
5835  return __pyx_r;
5836 }
5837 
5838 static int __pyx_pf_10cmeshTools_5CMesh_22nNodes_elementBoundary_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
5839  int __pyx_r;
5840  __Pyx_RefNannyDeclarations
5841  int __pyx_t_1;
5842  __Pyx_RefNannySetupContext("__set__", 0);
5843  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 11, __pyx_L1_error)
5844  __pyx_v_self->nNodes_elementBoundary = __pyx_t_1;
5845 
5846  /* function exit code */
5847  __pyx_r = 0;
5848  goto __pyx_L0;
5849  __pyx_L1_error:;
5850  __Pyx_AddTraceback("cmeshTools.CMesh.nNodes_elementBoundary.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5851  __pyx_r = -1;
5852  __pyx_L0:;
5853  __Pyx_RefNannyFinishContext();
5854  return __pyx_r;
5855 }
5856 
5857 /* "cmeshTools.pxd":12
5858  * cdef int nNodes_element
5859  * cdef int nNodes_elementBoundary
5860  * cdef int nElementBoundaries_element, # <<<<<<<<<<<<<<
5861  * cdef int nElementBoundaries_global,
5862  * cdef int nInteriorElementBoundaries_global,
5863  */
5864 
5865 /* Python wrapper */
5866 static PyObject *__pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_1__get__(PyObject *__pyx_v_self); /*proto*/
5867 static PyObject *__pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_1__get__(PyObject *__pyx_v_self) {
5868  PyObject *__pyx_r = 0;
5869  __Pyx_RefNannyDeclarations
5870  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5871  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5872 
5873  /* function exit code */
5874  __Pyx_RefNannyFinishContext();
5875  return __pyx_r;
5876 }
5877 
5878 static PyObject *__pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5879  PyObject *__pyx_r = NULL;
5880  __Pyx_RefNannyDeclarations
5881  PyObject *__pyx_t_1 = NULL;
5882  __Pyx_RefNannySetupContext("__get__", 0);
5883  __Pyx_XDECREF(__pyx_r);
5884  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nElementBoundaries_element); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error)
5885  __Pyx_GOTREF(__pyx_t_1);
5886  __pyx_r = __pyx_t_1;
5887  __pyx_t_1 = 0;
5888  goto __pyx_L0;
5889 
5890  /* function exit code */
5891  __pyx_L1_error:;
5892  __Pyx_XDECREF(__pyx_t_1);
5893  __Pyx_AddTraceback("cmeshTools.CMesh.nElementBoundaries_element.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5894  __pyx_r = NULL;
5895  __pyx_L0:;
5896  __Pyx_XGIVEREF(__pyx_r);
5897  __Pyx_RefNannyFinishContext();
5898  return __pyx_r;
5899 }
5900 
5901 /* Python wrapper */
5902 static int __pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5903 static int __pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5904  int __pyx_r;
5905  __Pyx_RefNannyDeclarations
5906  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5907  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5908 
5909  /* function exit code */
5910  __Pyx_RefNannyFinishContext();
5911  return __pyx_r;
5912 }
5913 
5914 static int __pyx_pf_10cmeshTools_5CMesh_26nElementBoundaries_element_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
5915  int __pyx_r;
5916  __Pyx_RefNannyDeclarations
5917  int __pyx_t_1;
5918  __Pyx_RefNannySetupContext("__set__", 0);
5919  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error)
5920  __pyx_v_self->nElementBoundaries_element = __pyx_t_1;
5921 
5922  /* function exit code */
5923  __pyx_r = 0;
5924  goto __pyx_L0;
5925  __pyx_L1_error:;
5926  __Pyx_AddTraceback("cmeshTools.CMesh.nElementBoundaries_element.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5927  __pyx_r = -1;
5928  __pyx_L0:;
5929  __Pyx_RefNannyFinishContext();
5930  return __pyx_r;
5931 }
5932 
5933 /* "cmeshTools.pxd":13
5934  * cdef int nNodes_elementBoundary
5935  * cdef int nElementBoundaries_element,
5936  * cdef int nElementBoundaries_global, # <<<<<<<<<<<<<<
5937  * cdef int nInteriorElementBoundaries_global,
5938  * cdef int nExteriorElementBoundaries_global,
5939  */
5940 
5941 /* Python wrapper */
5942 static PyObject *__pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_1__get__(PyObject *__pyx_v_self); /*proto*/
5943 static PyObject *__pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_1__get__(PyObject *__pyx_v_self) {
5944  PyObject *__pyx_r = 0;
5945  __Pyx_RefNannyDeclarations
5946  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
5947  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
5948 
5949  /* function exit code */
5950  __Pyx_RefNannyFinishContext();
5951  return __pyx_r;
5952 }
5953 
5954 static PyObject *__pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
5955  PyObject *__pyx_r = NULL;
5956  __Pyx_RefNannyDeclarations
5957  PyObject *__pyx_t_1 = NULL;
5958  __Pyx_RefNannySetupContext("__get__", 0);
5959  __Pyx_XDECREF(__pyx_r);
5960  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nElementBoundaries_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error)
5961  __Pyx_GOTREF(__pyx_t_1);
5962  __pyx_r = __pyx_t_1;
5963  __pyx_t_1 = 0;
5964  goto __pyx_L0;
5965 
5966  /* function exit code */
5967  __pyx_L1_error:;
5968  __Pyx_XDECREF(__pyx_t_1);
5969  __Pyx_AddTraceback("cmeshTools.CMesh.nElementBoundaries_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
5970  __pyx_r = NULL;
5971  __pyx_L0:;
5972  __Pyx_XGIVEREF(__pyx_r);
5973  __Pyx_RefNannyFinishContext();
5974  return __pyx_r;
5975 }
5976 
5977 /* Python wrapper */
5978 static int __pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
5979 static int __pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
5980  int __pyx_r;
5981  __Pyx_RefNannyDeclarations
5982  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
5983  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
5984 
5985  /* function exit code */
5986  __Pyx_RefNannyFinishContext();
5987  return __pyx_r;
5988 }
5989 
5990 static int __pyx_pf_10cmeshTools_5CMesh_25nElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
5991  int __pyx_r;
5992  __Pyx_RefNannyDeclarations
5993  int __pyx_t_1;
5994  __Pyx_RefNannySetupContext("__set__", 0);
5995  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 13, __pyx_L1_error)
5996  __pyx_v_self->nElementBoundaries_global = __pyx_t_1;
5997 
5998  /* function exit code */
5999  __pyx_r = 0;
6000  goto __pyx_L0;
6001  __pyx_L1_error:;
6002  __Pyx_AddTraceback("cmeshTools.CMesh.nElementBoundaries_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6003  __pyx_r = -1;
6004  __pyx_L0:;
6005  __Pyx_RefNannyFinishContext();
6006  return __pyx_r;
6007 }
6008 
6009 /* "cmeshTools.pxd":14
6010  * cdef int nElementBoundaries_element,
6011  * cdef int nElementBoundaries_global,
6012  * cdef int nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
6013  * cdef int nExteriorElementBoundaries_global,
6014  * cdef int max_nElements_node,
6015  */
6016 
6017 /* Python wrapper */
6018 static PyObject *__pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_1__get__(PyObject *__pyx_v_self); /*proto*/
6019 static PyObject *__pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_1__get__(PyObject *__pyx_v_self) {
6020  PyObject *__pyx_r = 0;
6021  __Pyx_RefNannyDeclarations
6022  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6023  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6024 
6025  /* function exit code */
6026  __Pyx_RefNannyFinishContext();
6027  return __pyx_r;
6028 }
6029 
6030 static PyObject *__pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6031  PyObject *__pyx_r = NULL;
6032  __Pyx_RefNannyDeclarations
6033  PyObject *__pyx_t_1 = NULL;
6034  __Pyx_RefNannySetupContext("__get__", 0);
6035  __Pyx_XDECREF(__pyx_r);
6036  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nInteriorElementBoundaries_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error)
6037  __Pyx_GOTREF(__pyx_t_1);
6038  __pyx_r = __pyx_t_1;
6039  __pyx_t_1 = 0;
6040  goto __pyx_L0;
6041 
6042  /* function exit code */
6043  __pyx_L1_error:;
6044  __Pyx_XDECREF(__pyx_t_1);
6045  __Pyx_AddTraceback("cmeshTools.CMesh.nInteriorElementBoundaries_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6046  __pyx_r = NULL;
6047  __pyx_L0:;
6048  __Pyx_XGIVEREF(__pyx_r);
6049  __Pyx_RefNannyFinishContext();
6050  return __pyx_r;
6051 }
6052 
6053 /* Python wrapper */
6054 static int __pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6055 static int __pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6056  int __pyx_r;
6057  __Pyx_RefNannyDeclarations
6058  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6059  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6060 
6061  /* function exit code */
6062  __Pyx_RefNannyFinishContext();
6063  return __pyx_r;
6064 }
6065 
6066 static int __pyx_pf_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6067  int __pyx_r;
6068  __Pyx_RefNannyDeclarations
6069  int __pyx_t_1;
6070  __Pyx_RefNannySetupContext("__set__", 0);
6071  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 14, __pyx_L1_error)
6072  __pyx_v_self->nInteriorElementBoundaries_global = __pyx_t_1;
6073 
6074  /* function exit code */
6075  __pyx_r = 0;
6076  goto __pyx_L0;
6077  __pyx_L1_error:;
6078  __Pyx_AddTraceback("cmeshTools.CMesh.nInteriorElementBoundaries_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6079  __pyx_r = -1;
6080  __pyx_L0:;
6081  __Pyx_RefNannyFinishContext();
6082  return __pyx_r;
6083 }
6084 
6085 /* "cmeshTools.pxd":15
6086  * cdef int nElementBoundaries_global,
6087  * cdef int nInteriorElementBoundaries_global,
6088  * cdef int nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
6089  * cdef int max_nElements_node,
6090  * cdef int nEdges_global,
6091  */
6092 
6093 /* Python wrapper */
6094 static PyObject *__pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_1__get__(PyObject *__pyx_v_self); /*proto*/
6095 static PyObject *__pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_1__get__(PyObject *__pyx_v_self) {
6096  PyObject *__pyx_r = 0;
6097  __Pyx_RefNannyDeclarations
6098  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6099  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6100 
6101  /* function exit code */
6102  __Pyx_RefNannyFinishContext();
6103  return __pyx_r;
6104 }
6105 
6106 static PyObject *__pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6107  PyObject *__pyx_r = NULL;
6108  __Pyx_RefNannyDeclarations
6109  PyObject *__pyx_t_1 = NULL;
6110  __Pyx_RefNannySetupContext("__get__", 0);
6111  __Pyx_XDECREF(__pyx_r);
6112  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nExteriorElementBoundaries_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error)
6113  __Pyx_GOTREF(__pyx_t_1);
6114  __pyx_r = __pyx_t_1;
6115  __pyx_t_1 = 0;
6116  goto __pyx_L0;
6117 
6118  /* function exit code */
6119  __pyx_L1_error:;
6120  __Pyx_XDECREF(__pyx_t_1);
6121  __Pyx_AddTraceback("cmeshTools.CMesh.nExteriorElementBoundaries_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6122  __pyx_r = NULL;
6123  __pyx_L0:;
6124  __Pyx_XGIVEREF(__pyx_r);
6125  __Pyx_RefNannyFinishContext();
6126  return __pyx_r;
6127 }
6128 
6129 /* Python wrapper */
6130 static int __pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6131 static int __pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6132  int __pyx_r;
6133  __Pyx_RefNannyDeclarations
6134  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6135  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6136 
6137  /* function exit code */
6138  __Pyx_RefNannyFinishContext();
6139  return __pyx_r;
6140 }
6141 
6142 static int __pyx_pf_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6143  int __pyx_r;
6144  __Pyx_RefNannyDeclarations
6145  int __pyx_t_1;
6146  __Pyx_RefNannySetupContext("__set__", 0);
6147  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 15, __pyx_L1_error)
6148  __pyx_v_self->nExteriorElementBoundaries_global = __pyx_t_1;
6149 
6150  /* function exit code */
6151  __pyx_r = 0;
6152  goto __pyx_L0;
6153  __pyx_L1_error:;
6154  __Pyx_AddTraceback("cmeshTools.CMesh.nExteriorElementBoundaries_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6155  __pyx_r = -1;
6156  __pyx_L0:;
6157  __Pyx_RefNannyFinishContext();
6158  return __pyx_r;
6159 }
6160 
6161 /* "cmeshTools.pxd":16
6162  * cdef int nInteriorElementBoundaries_global,
6163  * cdef int nExteriorElementBoundaries_global,
6164  * cdef int max_nElements_node, # <<<<<<<<<<<<<<
6165  * cdef int nEdges_global,
6166  * cdef int max_nNodeNeighbors_node,
6167  */
6168 
6169 /* Python wrapper */
6170 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_1__get__(PyObject *__pyx_v_self); /*proto*/
6171 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_1__get__(PyObject *__pyx_v_self) {
6172  PyObject *__pyx_r = 0;
6173  __Pyx_RefNannyDeclarations
6174  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6175  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18max_nElements_node___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6176 
6177  /* function exit code */
6178  __Pyx_RefNannyFinishContext();
6179  return __pyx_r;
6180 }
6181 
6182 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18max_nElements_node___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6183  PyObject *__pyx_r = NULL;
6184  __Pyx_RefNannyDeclarations
6185  PyObject *__pyx_t_1 = NULL;
6186  __Pyx_RefNannySetupContext("__get__", 0);
6187  __Pyx_XDECREF(__pyx_r);
6188  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->max_nElements_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 16, __pyx_L1_error)
6189  __Pyx_GOTREF(__pyx_t_1);
6190  __pyx_r = __pyx_t_1;
6191  __pyx_t_1 = 0;
6192  goto __pyx_L0;
6193 
6194  /* function exit code */
6195  __pyx_L1_error:;
6196  __Pyx_XDECREF(__pyx_t_1);
6197  __Pyx_AddTraceback("cmeshTools.CMesh.max_nElements_node.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6198  __pyx_r = NULL;
6199  __pyx_L0:;
6200  __Pyx_XGIVEREF(__pyx_r);
6201  __Pyx_RefNannyFinishContext();
6202  return __pyx_r;
6203 }
6204 
6205 /* Python wrapper */
6206 static int __pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6207 static int __pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6208  int __pyx_r;
6209  __Pyx_RefNannyDeclarations
6210  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6211  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18max_nElements_node_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6212 
6213  /* function exit code */
6214  __Pyx_RefNannyFinishContext();
6215  return __pyx_r;
6216 }
6217 
6218 static int __pyx_pf_10cmeshTools_5CMesh_18max_nElements_node_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6219  int __pyx_r;
6220  __Pyx_RefNannyDeclarations
6221  int __pyx_t_1;
6222  __Pyx_RefNannySetupContext("__set__", 0);
6223  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 16, __pyx_L1_error)
6224  __pyx_v_self->max_nElements_node = __pyx_t_1;
6225 
6226  /* function exit code */
6227  __pyx_r = 0;
6228  goto __pyx_L0;
6229  __pyx_L1_error:;
6230  __Pyx_AddTraceback("cmeshTools.CMesh.max_nElements_node.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6231  __pyx_r = -1;
6232  __pyx_L0:;
6233  __Pyx_RefNannyFinishContext();
6234  return __pyx_r;
6235 }
6236 
6237 /* "cmeshTools.pxd":17
6238  * cdef int nExteriorElementBoundaries_global,
6239  * cdef int max_nElements_node,
6240  * cdef int nEdges_global, # <<<<<<<<<<<<<<
6241  * cdef int max_nNodeNeighbors_node,
6242  * # cdef int[:,:] elementNodesArray,
6243  */
6244 
6245 /* Python wrapper */
6246 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nEdges_global_1__get__(PyObject *__pyx_v_self); /*proto*/
6247 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nEdges_global_1__get__(PyObject *__pyx_v_self) {
6248  PyObject *__pyx_r = 0;
6249  __Pyx_RefNannyDeclarations
6250  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6251  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nEdges_global___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6252 
6253  /* function exit code */
6254  __Pyx_RefNannyFinishContext();
6255  return __pyx_r;
6256 }
6257 
6258 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nEdges_global___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6259  PyObject *__pyx_r = NULL;
6260  __Pyx_RefNannyDeclarations
6261  PyObject *__pyx_t_1 = NULL;
6262  __Pyx_RefNannySetupContext("__get__", 0);
6263  __Pyx_XDECREF(__pyx_r);
6264  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nEdges_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error)
6265  __Pyx_GOTREF(__pyx_t_1);
6266  __pyx_r = __pyx_t_1;
6267  __pyx_t_1 = 0;
6268  goto __pyx_L0;
6269 
6270  /* function exit code */
6271  __pyx_L1_error:;
6272  __Pyx_XDECREF(__pyx_t_1);
6273  __Pyx_AddTraceback("cmeshTools.CMesh.nEdges_global.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6274  __pyx_r = NULL;
6275  __pyx_L0:;
6276  __Pyx_XGIVEREF(__pyx_r);
6277  __Pyx_RefNannyFinishContext();
6278  return __pyx_r;
6279 }
6280 
6281 /* Python wrapper */
6282 static int __pyx_pw_10cmeshTools_5CMesh_13nEdges_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6283 static int __pyx_pw_10cmeshTools_5CMesh_13nEdges_global_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6284  int __pyx_r;
6285  __Pyx_RefNannyDeclarations
6286  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6287  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nEdges_global_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6288 
6289  /* function exit code */
6290  __Pyx_RefNannyFinishContext();
6291  return __pyx_r;
6292 }
6293 
6294 static int __pyx_pf_10cmeshTools_5CMesh_13nEdges_global_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6295  int __pyx_r;
6296  __Pyx_RefNannyDeclarations
6297  int __pyx_t_1;
6298  __Pyx_RefNannySetupContext("__set__", 0);
6299  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 17, __pyx_L1_error)
6300  __pyx_v_self->nEdges_global = __pyx_t_1;
6301 
6302  /* function exit code */
6303  __pyx_r = 0;
6304  goto __pyx_L0;
6305  __pyx_L1_error:;
6306  __Pyx_AddTraceback("cmeshTools.CMesh.nEdges_global.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6307  __pyx_r = -1;
6308  __pyx_L0:;
6309  __Pyx_RefNannyFinishContext();
6310  return __pyx_r;
6311 }
6312 
6313 /* "cmeshTools.pxd":18
6314  * cdef int max_nElements_node,
6315  * cdef int nEdges_global,
6316  * cdef int max_nNodeNeighbors_node, # <<<<<<<<<<<<<<
6317  * # cdef int[:,:] elementNodesArray,
6318  * # cdef int[:] nodeElementsArray,
6319  */
6320 
6321 /* Python wrapper */
6322 static PyObject *__pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_1__get__(PyObject *__pyx_v_self); /*proto*/
6323 static PyObject *__pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_1__get__(PyObject *__pyx_v_self) {
6324  PyObject *__pyx_r = 0;
6325  __Pyx_RefNannyDeclarations
6326  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6327  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6328 
6329  /* function exit code */
6330  __Pyx_RefNannyFinishContext();
6331  return __pyx_r;
6332 }
6333 
6334 static PyObject *__pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6335  PyObject *__pyx_r = NULL;
6336  __Pyx_RefNannyDeclarations
6337  PyObject *__pyx_t_1 = NULL;
6338  __Pyx_RefNannySetupContext("__get__", 0);
6339  __Pyx_XDECREF(__pyx_r);
6340  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->max_nNodeNeighbors_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 18, __pyx_L1_error)
6341  __Pyx_GOTREF(__pyx_t_1);
6342  __pyx_r = __pyx_t_1;
6343  __pyx_t_1 = 0;
6344  goto __pyx_L0;
6345 
6346  /* function exit code */
6347  __pyx_L1_error:;
6348  __Pyx_XDECREF(__pyx_t_1);
6349  __Pyx_AddTraceback("cmeshTools.CMesh.max_nNodeNeighbors_node.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6350  __pyx_r = NULL;
6351  __pyx_L0:;
6352  __Pyx_XGIVEREF(__pyx_r);
6353  __Pyx_RefNannyFinishContext();
6354  return __pyx_r;
6355 }
6356 
6357 /* Python wrapper */
6358 static int __pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6359 static int __pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6360  int __pyx_r;
6361  __Pyx_RefNannyDeclarations
6362  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6363  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6364 
6365  /* function exit code */
6366  __Pyx_RefNannyFinishContext();
6367  return __pyx_r;
6368 }
6369 
6370 static int __pyx_pf_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6371  int __pyx_r;
6372  __Pyx_RefNannyDeclarations
6373  int __pyx_t_1;
6374  __Pyx_RefNannySetupContext("__set__", 0);
6375  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 18, __pyx_L1_error)
6376  __pyx_v_self->max_nNodeNeighbors_node = __pyx_t_1;
6377 
6378  /* function exit code */
6379  __pyx_r = 0;
6380  goto __pyx_L0;
6381  __pyx_L1_error:;
6382  __Pyx_AddTraceback("cmeshTools.CMesh.max_nNodeNeighbors_node.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6383  __pyx_r = -1;
6384  __pyx_L0:;
6385  __Pyx_RefNannyFinishContext();
6386  return __pyx_r;
6387 }
6388 
6389 /* "cmeshTools.pxd":37
6390  * # cdef double[:,:] nodeArray,
6391  *
6392  * cdef np.ndarray elementNodesArray, # <<<<<<<<<<<<<<
6393  * cdef np.ndarray nodeElementsArray,
6394  * cdef np.ndarray nodeElementOffsets,
6395  */
6396 
6397 /* Python wrapper */
6398 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
6399 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_1__get__(PyObject *__pyx_v_self) {
6400  PyObject *__pyx_r = 0;
6401  __Pyx_RefNannyDeclarations
6402  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6403  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6404 
6405  /* function exit code */
6406  __Pyx_RefNannyFinishContext();
6407  return __pyx_r;
6408 }
6409 
6410 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17elementNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6411  PyObject *__pyx_r = NULL;
6412  __Pyx_RefNannyDeclarations
6413  __Pyx_RefNannySetupContext("__get__", 0);
6414  __Pyx_XDECREF(__pyx_r);
6415  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementNodesArray));
6416  __pyx_r = ((PyObject *)__pyx_v_self->elementNodesArray);
6417  goto __pyx_L0;
6418 
6419  /* function exit code */
6420  __pyx_L0:;
6421  __Pyx_XGIVEREF(__pyx_r);
6422  __Pyx_RefNannyFinishContext();
6423  return __pyx_r;
6424 }
6425 
6426 /* Python wrapper */
6427 static int __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6428 static int __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6429  int __pyx_r;
6430  __Pyx_RefNannyDeclarations
6431  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6432  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6433 
6434  /* function exit code */
6435  __Pyx_RefNannyFinishContext();
6436  return __pyx_r;
6437 }
6438 
6439 static int __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6440  int __pyx_r;
6441  __Pyx_RefNannyDeclarations
6442  PyObject *__pyx_t_1 = NULL;
6443  __Pyx_RefNannySetupContext("__set__", 0);
6444  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 37, __pyx_L1_error)
6445  __pyx_t_1 = __pyx_v_value;
6446  __Pyx_INCREF(__pyx_t_1);
6447  __Pyx_GIVEREF(__pyx_t_1);
6448  __Pyx_GOTREF(__pyx_v_self->elementNodesArray);
6449  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNodesArray));
6450  __pyx_v_self->elementNodesArray = ((PyArrayObject *)__pyx_t_1);
6451  __pyx_t_1 = 0;
6452 
6453  /* function exit code */
6454  __pyx_r = 0;
6455  goto __pyx_L0;
6456  __pyx_L1_error:;
6457  __Pyx_XDECREF(__pyx_t_1);
6458  __Pyx_AddTraceback("cmeshTools.CMesh.elementNodesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6459  __pyx_r = -1;
6460  __pyx_L0:;
6461  __Pyx_RefNannyFinishContext();
6462  return __pyx_r;
6463 }
6464 
6465 /* Python wrapper */
6466 static int __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
6467 static int __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_5__del__(PyObject *__pyx_v_self) {
6468  int __pyx_r;
6469  __Pyx_RefNannyDeclarations
6470  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6471  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6472 
6473  /* function exit code */
6474  __Pyx_RefNannyFinishContext();
6475  return __pyx_r;
6476 }
6477 
6478 static int __pyx_pf_10cmeshTools_5CMesh_17elementNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6479  int __pyx_r;
6480  __Pyx_RefNannyDeclarations
6481  __Pyx_RefNannySetupContext("__del__", 0);
6482  __Pyx_INCREF(Py_None);
6483  __Pyx_GIVEREF(Py_None);
6484  __Pyx_GOTREF(__pyx_v_self->elementNodesArray);
6485  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNodesArray));
6486  __pyx_v_self->elementNodesArray = ((PyArrayObject *)Py_None);
6487 
6488  /* function exit code */
6489  __pyx_r = 0;
6490  __Pyx_RefNannyFinishContext();
6491  return __pyx_r;
6492 }
6493 
6494 /* "cmeshTools.pxd":38
6495  *
6496  * cdef np.ndarray elementNodesArray,
6497  * cdef np.ndarray nodeElementsArray, # <<<<<<<<<<<<<<
6498  * cdef np.ndarray nodeElementOffsets,
6499  * cdef np.ndarray elementNeighborsArray,
6500  */
6501 
6502 /* Python wrapper */
6503 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_1__get__(PyObject *__pyx_v_self); /*proto*/
6504 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_1__get__(PyObject *__pyx_v_self) {
6505  PyObject *__pyx_r = 0;
6506  __Pyx_RefNannyDeclarations
6507  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6508  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6509 
6510  /* function exit code */
6511  __Pyx_RefNannyFinishContext();
6512  return __pyx_r;
6513 }
6514 
6515 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6516  PyObject *__pyx_r = NULL;
6517  __Pyx_RefNannyDeclarations
6518  __Pyx_RefNannySetupContext("__get__", 0);
6519  __Pyx_XDECREF(__pyx_r);
6520  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeElementsArray));
6521  __pyx_r = ((PyObject *)__pyx_v_self->nodeElementsArray);
6522  goto __pyx_L0;
6523 
6524  /* function exit code */
6525  __pyx_L0:;
6526  __Pyx_XGIVEREF(__pyx_r);
6527  __Pyx_RefNannyFinishContext();
6528  return __pyx_r;
6529 }
6530 
6531 /* Python wrapper */
6532 static int __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6533 static int __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6534  int __pyx_r;
6535  __Pyx_RefNannyDeclarations
6536  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6537  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6538 
6539  /* function exit code */
6540  __Pyx_RefNannyFinishContext();
6541  return __pyx_r;
6542 }
6543 
6544 static int __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6545  int __pyx_r;
6546  __Pyx_RefNannyDeclarations
6547  PyObject *__pyx_t_1 = NULL;
6548  __Pyx_RefNannySetupContext("__set__", 0);
6549  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 38, __pyx_L1_error)
6550  __pyx_t_1 = __pyx_v_value;
6551  __Pyx_INCREF(__pyx_t_1);
6552  __Pyx_GIVEREF(__pyx_t_1);
6553  __Pyx_GOTREF(__pyx_v_self->nodeElementsArray);
6554  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementsArray));
6555  __pyx_v_self->nodeElementsArray = ((PyArrayObject *)__pyx_t_1);
6556  __pyx_t_1 = 0;
6557 
6558  /* function exit code */
6559  __pyx_r = 0;
6560  goto __pyx_L0;
6561  __pyx_L1_error:;
6562  __Pyx_XDECREF(__pyx_t_1);
6563  __Pyx_AddTraceback("cmeshTools.CMesh.nodeElementsArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6564  __pyx_r = -1;
6565  __pyx_L0:;
6566  __Pyx_RefNannyFinishContext();
6567  return __pyx_r;
6568 }
6569 
6570 /* Python wrapper */
6571 static int __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_5__del__(PyObject *__pyx_v_self); /*proto*/
6572 static int __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_5__del__(PyObject *__pyx_v_self) {
6573  int __pyx_r;
6574  __Pyx_RefNannyDeclarations
6575  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6576  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6577 
6578  /* function exit code */
6579  __Pyx_RefNannyFinishContext();
6580  return __pyx_r;
6581 }
6582 
6583 static int __pyx_pf_10cmeshTools_5CMesh_17nodeElementsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6584  int __pyx_r;
6585  __Pyx_RefNannyDeclarations
6586  __Pyx_RefNannySetupContext("__del__", 0);
6587  __Pyx_INCREF(Py_None);
6588  __Pyx_GIVEREF(Py_None);
6589  __Pyx_GOTREF(__pyx_v_self->nodeElementsArray);
6590  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementsArray));
6591  __pyx_v_self->nodeElementsArray = ((PyArrayObject *)Py_None);
6592 
6593  /* function exit code */
6594  __pyx_r = 0;
6595  __Pyx_RefNannyFinishContext();
6596  return __pyx_r;
6597 }
6598 
6599 /* "cmeshTools.pxd":39
6600  * cdef np.ndarray elementNodesArray,
6601  * cdef np.ndarray nodeElementsArray,
6602  * cdef np.ndarray nodeElementOffsets, # <<<<<<<<<<<<<<
6603  * cdef np.ndarray elementNeighborsArray,
6604  * cdef np.ndarray elementBoundariesArray,
6605  */
6606 
6607 /* Python wrapper */
6608 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
6609 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_1__get__(PyObject *__pyx_v_self) {
6610  PyObject *__pyx_r = 0;
6611  __Pyx_RefNannyDeclarations
6612  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6613  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6614 
6615  /* function exit code */
6616  __Pyx_RefNannyFinishContext();
6617  return __pyx_r;
6618 }
6619 
6620 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6621  PyObject *__pyx_r = NULL;
6622  __Pyx_RefNannyDeclarations
6623  __Pyx_RefNannySetupContext("__get__", 0);
6624  __Pyx_XDECREF(__pyx_r);
6625  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeElementOffsets));
6626  __pyx_r = ((PyObject *)__pyx_v_self->nodeElementOffsets);
6627  goto __pyx_L0;
6628 
6629  /* function exit code */
6630  __pyx_L0:;
6631  __Pyx_XGIVEREF(__pyx_r);
6632  __Pyx_RefNannyFinishContext();
6633  return __pyx_r;
6634 }
6635 
6636 /* Python wrapper */
6637 static int __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6638 static int __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6639  int __pyx_r;
6640  __Pyx_RefNannyDeclarations
6641  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6642  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6643 
6644  /* function exit code */
6645  __Pyx_RefNannyFinishContext();
6646  return __pyx_r;
6647 }
6648 
6649 static int __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6650  int __pyx_r;
6651  __Pyx_RefNannyDeclarations
6652  PyObject *__pyx_t_1 = NULL;
6653  __Pyx_RefNannySetupContext("__set__", 0);
6654  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 39, __pyx_L1_error)
6655  __pyx_t_1 = __pyx_v_value;
6656  __Pyx_INCREF(__pyx_t_1);
6657  __Pyx_GIVEREF(__pyx_t_1);
6658  __Pyx_GOTREF(__pyx_v_self->nodeElementOffsets);
6659  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementOffsets));
6660  __pyx_v_self->nodeElementOffsets = ((PyArrayObject *)__pyx_t_1);
6661  __pyx_t_1 = 0;
6662 
6663  /* function exit code */
6664  __pyx_r = 0;
6665  goto __pyx_L0;
6666  __pyx_L1_error:;
6667  __Pyx_XDECREF(__pyx_t_1);
6668  __Pyx_AddTraceback("cmeshTools.CMesh.nodeElementOffsets.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6669  __pyx_r = -1;
6670  __pyx_L0:;
6671  __Pyx_RefNannyFinishContext();
6672  return __pyx_r;
6673 }
6674 
6675 /* Python wrapper */
6676 static int __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_5__del__(PyObject *__pyx_v_self); /*proto*/
6677 static int __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_5__del__(PyObject *__pyx_v_self) {
6678  int __pyx_r;
6679  __Pyx_RefNannyDeclarations
6680  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6681  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6682 
6683  /* function exit code */
6684  __Pyx_RefNannyFinishContext();
6685  return __pyx_r;
6686 }
6687 
6688 static int __pyx_pf_10cmeshTools_5CMesh_18nodeElementOffsets_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6689  int __pyx_r;
6690  __Pyx_RefNannyDeclarations
6691  __Pyx_RefNannySetupContext("__del__", 0);
6692  __Pyx_INCREF(Py_None);
6693  __Pyx_GIVEREF(Py_None);
6694  __Pyx_GOTREF(__pyx_v_self->nodeElementOffsets);
6695  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeElementOffsets));
6696  __pyx_v_self->nodeElementOffsets = ((PyArrayObject *)Py_None);
6697 
6698  /* function exit code */
6699  __pyx_r = 0;
6700  __Pyx_RefNannyFinishContext();
6701  return __pyx_r;
6702 }
6703 
6704 /* "cmeshTools.pxd":40
6705  * cdef np.ndarray nodeElementsArray,
6706  * cdef np.ndarray nodeElementOffsets,
6707  * cdef np.ndarray elementNeighborsArray, # <<<<<<<<<<<<<<
6708  * cdef np.ndarray elementBoundariesArray,
6709  * cdef np.ndarray elementBoundaryNodesArray,
6710  */
6711 
6712 /* Python wrapper */
6713 static PyObject *__pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_1__get__(PyObject *__pyx_v_self); /*proto*/
6714 static PyObject *__pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_1__get__(PyObject *__pyx_v_self) {
6715  PyObject *__pyx_r = 0;
6716  __Pyx_RefNannyDeclarations
6717  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6718  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6719 
6720  /* function exit code */
6721  __Pyx_RefNannyFinishContext();
6722  return __pyx_r;
6723 }
6724 
6725 static PyObject *__pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6726  PyObject *__pyx_r = NULL;
6727  __Pyx_RefNannyDeclarations
6728  __Pyx_RefNannySetupContext("__get__", 0);
6729  __Pyx_XDECREF(__pyx_r);
6730  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementNeighborsArray));
6731  __pyx_r = ((PyObject *)__pyx_v_self->elementNeighborsArray);
6732  goto __pyx_L0;
6733 
6734  /* function exit code */
6735  __pyx_L0:;
6736  __Pyx_XGIVEREF(__pyx_r);
6737  __Pyx_RefNannyFinishContext();
6738  return __pyx_r;
6739 }
6740 
6741 /* Python wrapper */
6742 static int __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6743 static int __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6744  int __pyx_r;
6745  __Pyx_RefNannyDeclarations
6746  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6747  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6748 
6749  /* function exit code */
6750  __Pyx_RefNannyFinishContext();
6751  return __pyx_r;
6752 }
6753 
6754 static int __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6755  int __pyx_r;
6756  __Pyx_RefNannyDeclarations
6757  PyObject *__pyx_t_1 = NULL;
6758  __Pyx_RefNannySetupContext("__set__", 0);
6759  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 40, __pyx_L1_error)
6760  __pyx_t_1 = __pyx_v_value;
6761  __Pyx_INCREF(__pyx_t_1);
6762  __Pyx_GIVEREF(__pyx_t_1);
6763  __Pyx_GOTREF(__pyx_v_self->elementNeighborsArray);
6764  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNeighborsArray));
6765  __pyx_v_self->elementNeighborsArray = ((PyArrayObject *)__pyx_t_1);
6766  __pyx_t_1 = 0;
6767 
6768  /* function exit code */
6769  __pyx_r = 0;
6770  goto __pyx_L0;
6771  __pyx_L1_error:;
6772  __Pyx_XDECREF(__pyx_t_1);
6773  __Pyx_AddTraceback("cmeshTools.CMesh.elementNeighborsArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6774  __pyx_r = -1;
6775  __pyx_L0:;
6776  __Pyx_RefNannyFinishContext();
6777  return __pyx_r;
6778 }
6779 
6780 /* Python wrapper */
6781 static int __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_5__del__(PyObject *__pyx_v_self); /*proto*/
6782 static int __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_5__del__(PyObject *__pyx_v_self) {
6783  int __pyx_r;
6784  __Pyx_RefNannyDeclarations
6785  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6786  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6787 
6788  /* function exit code */
6789  __Pyx_RefNannyFinishContext();
6790  return __pyx_r;
6791 }
6792 
6793 static int __pyx_pf_10cmeshTools_5CMesh_21elementNeighborsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6794  int __pyx_r;
6795  __Pyx_RefNannyDeclarations
6796  __Pyx_RefNannySetupContext("__del__", 0);
6797  __Pyx_INCREF(Py_None);
6798  __Pyx_GIVEREF(Py_None);
6799  __Pyx_GOTREF(__pyx_v_self->elementNeighborsArray);
6800  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementNeighborsArray));
6801  __pyx_v_self->elementNeighborsArray = ((PyArrayObject *)Py_None);
6802 
6803  /* function exit code */
6804  __pyx_r = 0;
6805  __Pyx_RefNannyFinishContext();
6806  return __pyx_r;
6807 }
6808 
6809 /* "cmeshTools.pxd":41
6810  * cdef np.ndarray nodeElementOffsets,
6811  * cdef np.ndarray elementNeighborsArray,
6812  * cdef np.ndarray elementBoundariesArray, # <<<<<<<<<<<<<<
6813  * cdef np.ndarray elementBoundaryNodesArray,
6814  * cdef np.ndarray elementBoundaryElementsArray,
6815  */
6816 
6817 /* Python wrapper */
6818 static PyObject *__pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
6819 static PyObject *__pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_1__get__(PyObject *__pyx_v_self) {
6820  PyObject *__pyx_r = 0;
6821  __Pyx_RefNannyDeclarations
6822  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6823  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6824 
6825  /* function exit code */
6826  __Pyx_RefNannyFinishContext();
6827  return __pyx_r;
6828 }
6829 
6830 static PyObject *__pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6831  PyObject *__pyx_r = NULL;
6832  __Pyx_RefNannyDeclarations
6833  __Pyx_RefNannySetupContext("__get__", 0);
6834  __Pyx_XDECREF(__pyx_r);
6835  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundariesArray));
6836  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundariesArray);
6837  goto __pyx_L0;
6838 
6839  /* function exit code */
6840  __pyx_L0:;
6841  __Pyx_XGIVEREF(__pyx_r);
6842  __Pyx_RefNannyFinishContext();
6843  return __pyx_r;
6844 }
6845 
6846 /* Python wrapper */
6847 static int __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6848 static int __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6849  int __pyx_r;
6850  __Pyx_RefNannyDeclarations
6851  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6852  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6853 
6854  /* function exit code */
6855  __Pyx_RefNannyFinishContext();
6856  return __pyx_r;
6857 }
6858 
6859 static int __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6860  int __pyx_r;
6861  __Pyx_RefNannyDeclarations
6862  PyObject *__pyx_t_1 = NULL;
6863  __Pyx_RefNannySetupContext("__set__", 0);
6864  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 41, __pyx_L1_error)
6865  __pyx_t_1 = __pyx_v_value;
6866  __Pyx_INCREF(__pyx_t_1);
6867  __Pyx_GIVEREF(__pyx_t_1);
6868  __Pyx_GOTREF(__pyx_v_self->elementBoundariesArray);
6869  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundariesArray));
6870  __pyx_v_self->elementBoundariesArray = ((PyArrayObject *)__pyx_t_1);
6871  __pyx_t_1 = 0;
6872 
6873  /* function exit code */
6874  __pyx_r = 0;
6875  goto __pyx_L0;
6876  __pyx_L1_error:;
6877  __Pyx_XDECREF(__pyx_t_1);
6878  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundariesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6879  __pyx_r = -1;
6880  __pyx_L0:;
6881  __Pyx_RefNannyFinishContext();
6882  return __pyx_r;
6883 }
6884 
6885 /* Python wrapper */
6886 static int __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
6887 static int __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_5__del__(PyObject *__pyx_v_self) {
6888  int __pyx_r;
6889  __Pyx_RefNannyDeclarations
6890  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6891  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6892 
6893  /* function exit code */
6894  __Pyx_RefNannyFinishContext();
6895  return __pyx_r;
6896 }
6897 
6898 static int __pyx_pf_10cmeshTools_5CMesh_22elementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6899  int __pyx_r;
6900  __Pyx_RefNannyDeclarations
6901  __Pyx_RefNannySetupContext("__del__", 0);
6902  __Pyx_INCREF(Py_None);
6903  __Pyx_GIVEREF(Py_None);
6904  __Pyx_GOTREF(__pyx_v_self->elementBoundariesArray);
6905  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundariesArray));
6906  __pyx_v_self->elementBoundariesArray = ((PyArrayObject *)Py_None);
6907 
6908  /* function exit code */
6909  __pyx_r = 0;
6910  __Pyx_RefNannyFinishContext();
6911  return __pyx_r;
6912 }
6913 
6914 /* "cmeshTools.pxd":42
6915  * cdef np.ndarray elementNeighborsArray,
6916  * cdef np.ndarray elementBoundariesArray,
6917  * cdef np.ndarray elementBoundaryNodesArray, # <<<<<<<<<<<<<<
6918  * cdef np.ndarray elementBoundaryElementsArray,
6919  * cdef np.ndarray elementBoundaryLocalElementBoundariesArray,
6920  */
6921 
6922 /* Python wrapper */
6923 static PyObject *__pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
6924 static PyObject *__pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_1__get__(PyObject *__pyx_v_self) {
6925  PyObject *__pyx_r = 0;
6926  __Pyx_RefNannyDeclarations
6927  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
6928  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6929 
6930  /* function exit code */
6931  __Pyx_RefNannyFinishContext();
6932  return __pyx_r;
6933 }
6934 
6935 static PyObject *__pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
6936  PyObject *__pyx_r = NULL;
6937  __Pyx_RefNannyDeclarations
6938  __Pyx_RefNannySetupContext("__get__", 0);
6939  __Pyx_XDECREF(__pyx_r);
6940  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryNodesArray));
6941  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryNodesArray);
6942  goto __pyx_L0;
6943 
6944  /* function exit code */
6945  __pyx_L0:;
6946  __Pyx_XGIVEREF(__pyx_r);
6947  __Pyx_RefNannyFinishContext();
6948  return __pyx_r;
6949 }
6950 
6951 /* Python wrapper */
6952 static int __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
6953 static int __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
6954  int __pyx_r;
6955  __Pyx_RefNannyDeclarations
6956  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
6957  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
6958 
6959  /* function exit code */
6960  __Pyx_RefNannyFinishContext();
6961  return __pyx_r;
6962 }
6963 
6964 static int __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
6965  int __pyx_r;
6966  __Pyx_RefNannyDeclarations
6967  PyObject *__pyx_t_1 = NULL;
6968  __Pyx_RefNannySetupContext("__set__", 0);
6969  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 42, __pyx_L1_error)
6970  __pyx_t_1 = __pyx_v_value;
6971  __Pyx_INCREF(__pyx_t_1);
6972  __Pyx_GIVEREF(__pyx_t_1);
6973  __Pyx_GOTREF(__pyx_v_self->elementBoundaryNodesArray);
6974  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryNodesArray));
6975  __pyx_v_self->elementBoundaryNodesArray = ((PyArrayObject *)__pyx_t_1);
6976  __pyx_t_1 = 0;
6977 
6978  /* function exit code */
6979  __pyx_r = 0;
6980  goto __pyx_L0;
6981  __pyx_L1_error:;
6982  __Pyx_XDECREF(__pyx_t_1);
6983  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryNodesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
6984  __pyx_r = -1;
6985  __pyx_L0:;
6986  __Pyx_RefNannyFinishContext();
6987  return __pyx_r;
6988 }
6989 
6990 /* Python wrapper */
6991 static int __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
6992 static int __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_5__del__(PyObject *__pyx_v_self) {
6993  int __pyx_r;
6994  __Pyx_RefNannyDeclarations
6995  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
6996  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
6997 
6998  /* function exit code */
6999  __Pyx_RefNannyFinishContext();
7000  return __pyx_r;
7001 }
7002 
7003 static int __pyx_pf_10cmeshTools_5CMesh_25elementBoundaryNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7004  int __pyx_r;
7005  __Pyx_RefNannyDeclarations
7006  __Pyx_RefNannySetupContext("__del__", 0);
7007  __Pyx_INCREF(Py_None);
7008  __Pyx_GIVEREF(Py_None);
7009  __Pyx_GOTREF(__pyx_v_self->elementBoundaryNodesArray);
7010  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryNodesArray));
7011  __pyx_v_self->elementBoundaryNodesArray = ((PyArrayObject *)Py_None);
7012 
7013  /* function exit code */
7014  __pyx_r = 0;
7015  __Pyx_RefNannyFinishContext();
7016  return __pyx_r;
7017 }
7018 
7019 /* "cmeshTools.pxd":43
7020  * cdef np.ndarray elementBoundariesArray,
7021  * cdef np.ndarray elementBoundaryNodesArray,
7022  * cdef np.ndarray elementBoundaryElementsArray, # <<<<<<<<<<<<<<
7023  * cdef np.ndarray elementBoundaryLocalElementBoundariesArray,
7024  * cdef np.ndarray interiorElementBoundariesArray,
7025  */
7026 
7027 /* Python wrapper */
7028 static PyObject *__pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7029 static PyObject *__pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_1__get__(PyObject *__pyx_v_self) {
7030  PyObject *__pyx_r = 0;
7031  __Pyx_RefNannyDeclarations
7032  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7033  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7034 
7035  /* function exit code */
7036  __Pyx_RefNannyFinishContext();
7037  return __pyx_r;
7038 }
7039 
7040 static PyObject *__pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7041  PyObject *__pyx_r = NULL;
7042  __Pyx_RefNannyDeclarations
7043  __Pyx_RefNannySetupContext("__get__", 0);
7044  __Pyx_XDECREF(__pyx_r);
7045  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryElementsArray));
7046  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryElementsArray);
7047  goto __pyx_L0;
7048 
7049  /* function exit code */
7050  __pyx_L0:;
7051  __Pyx_XGIVEREF(__pyx_r);
7052  __Pyx_RefNannyFinishContext();
7053  return __pyx_r;
7054 }
7055 
7056 /* Python wrapper */
7057 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7058 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7059  int __pyx_r;
7060  __Pyx_RefNannyDeclarations
7061  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7062  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7063 
7064  /* function exit code */
7065  __Pyx_RefNannyFinishContext();
7066  return __pyx_r;
7067 }
7068 
7069 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7070  int __pyx_r;
7071  __Pyx_RefNannyDeclarations
7072  PyObject *__pyx_t_1 = NULL;
7073  __Pyx_RefNannySetupContext("__set__", 0);
7074  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 43, __pyx_L1_error)
7075  __pyx_t_1 = __pyx_v_value;
7076  __Pyx_INCREF(__pyx_t_1);
7077  __Pyx_GIVEREF(__pyx_t_1);
7078  __Pyx_GOTREF(__pyx_v_self->elementBoundaryElementsArray);
7079  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryElementsArray));
7080  __pyx_v_self->elementBoundaryElementsArray = ((PyArrayObject *)__pyx_t_1);
7081  __pyx_t_1 = 0;
7082 
7083  /* function exit code */
7084  __pyx_r = 0;
7085  goto __pyx_L0;
7086  __pyx_L1_error:;
7087  __Pyx_XDECREF(__pyx_t_1);
7088  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryElementsArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7089  __pyx_r = -1;
7090  __pyx_L0:;
7091  __Pyx_RefNannyFinishContext();
7092  return __pyx_r;
7093 }
7094 
7095 /* Python wrapper */
7096 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7097 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_5__del__(PyObject *__pyx_v_self) {
7098  int __pyx_r;
7099  __Pyx_RefNannyDeclarations
7100  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7101  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7102 
7103  /* function exit code */
7104  __Pyx_RefNannyFinishContext();
7105  return __pyx_r;
7106 }
7107 
7108 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryElementsArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7109  int __pyx_r;
7110  __Pyx_RefNannyDeclarations
7111  __Pyx_RefNannySetupContext("__del__", 0);
7112  __Pyx_INCREF(Py_None);
7113  __Pyx_GIVEREF(Py_None);
7114  __Pyx_GOTREF(__pyx_v_self->elementBoundaryElementsArray);
7115  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryElementsArray));
7116  __pyx_v_self->elementBoundaryElementsArray = ((PyArrayObject *)Py_None);
7117 
7118  /* function exit code */
7119  __pyx_r = 0;
7120  __Pyx_RefNannyFinishContext();
7121  return __pyx_r;
7122 }
7123 
7124 /* "cmeshTools.pxd":44
7125  * cdef np.ndarray elementBoundaryNodesArray,
7126  * cdef np.ndarray elementBoundaryElementsArray,
7127  * cdef np.ndarray elementBoundaryLocalElementBoundariesArray, # <<<<<<<<<<<<<<
7128  * cdef np.ndarray interiorElementBoundariesArray,
7129  * cdef np.ndarray exteriorElementBoundariesArray,
7130  */
7131 
7132 /* Python wrapper */
7133 static PyObject *__pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7134 static PyObject *__pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_1__get__(PyObject *__pyx_v_self) {
7135  PyObject *__pyx_r = 0;
7136  __Pyx_RefNannyDeclarations
7137  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7138  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7139 
7140  /* function exit code */
7141  __Pyx_RefNannyFinishContext();
7142  return __pyx_r;
7143 }
7144 
7145 static PyObject *__pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7146  PyObject *__pyx_r = NULL;
7147  __Pyx_RefNannyDeclarations
7148  __Pyx_RefNannySetupContext("__get__", 0);
7149  __Pyx_XDECREF(__pyx_r);
7150  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryLocalElementBoundariesArray));
7151  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryLocalElementBoundariesArray);
7152  goto __pyx_L0;
7153 
7154  /* function exit code */
7155  __pyx_L0:;
7156  __Pyx_XGIVEREF(__pyx_r);
7157  __Pyx_RefNannyFinishContext();
7158  return __pyx_r;
7159 }
7160 
7161 /* Python wrapper */
7162 static int __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7163 static int __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7164  int __pyx_r;
7165  __Pyx_RefNannyDeclarations
7166  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7167  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7168 
7169  /* function exit code */
7170  __Pyx_RefNannyFinishContext();
7171  return __pyx_r;
7172 }
7173 
7174 static int __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7175  int __pyx_r;
7176  __Pyx_RefNannyDeclarations
7177  PyObject *__pyx_t_1 = NULL;
7178  __Pyx_RefNannySetupContext("__set__", 0);
7179  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 44, __pyx_L1_error)
7180  __pyx_t_1 = __pyx_v_value;
7181  __Pyx_INCREF(__pyx_t_1);
7182  __Pyx_GIVEREF(__pyx_t_1);
7183  __Pyx_GOTREF(__pyx_v_self->elementBoundaryLocalElementBoundariesArray);
7184  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryLocalElementBoundariesArray));
7185  __pyx_v_self->elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)__pyx_t_1);
7186  __pyx_t_1 = 0;
7187 
7188  /* function exit code */
7189  __pyx_r = 0;
7190  goto __pyx_L0;
7191  __pyx_L1_error:;
7192  __Pyx_XDECREF(__pyx_t_1);
7193  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryLocalElementBoundariesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7194  __pyx_r = -1;
7195  __pyx_L0:;
7196  __Pyx_RefNannyFinishContext();
7197  return __pyx_r;
7198 }
7199 
7200 /* Python wrapper */
7201 static int __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7202 static int __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_5__del__(PyObject *__pyx_v_self) {
7203  int __pyx_r;
7204  __Pyx_RefNannyDeclarations
7205  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7206  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7207 
7208  /* function exit code */
7209  __Pyx_RefNannyFinishContext();
7210  return __pyx_r;
7211 }
7212 
7213 static int __pyx_pf_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7214  int __pyx_r;
7215  __Pyx_RefNannyDeclarations
7216  __Pyx_RefNannySetupContext("__del__", 0);
7217  __Pyx_INCREF(Py_None);
7218  __Pyx_GIVEREF(Py_None);
7219  __Pyx_GOTREF(__pyx_v_self->elementBoundaryLocalElementBoundariesArray);
7220  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryLocalElementBoundariesArray));
7221  __pyx_v_self->elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)Py_None);
7222 
7223  /* function exit code */
7224  __pyx_r = 0;
7225  __Pyx_RefNannyFinishContext();
7226  return __pyx_r;
7227 }
7228 
7229 /* "cmeshTools.pxd":45
7230  * cdef np.ndarray elementBoundaryElementsArray,
7231  * cdef np.ndarray elementBoundaryLocalElementBoundariesArray,
7232  * cdef np.ndarray interiorElementBoundariesArray, # <<<<<<<<<<<<<<
7233  * cdef np.ndarray exteriorElementBoundariesArray,
7234  * cdef np.ndarray edgeNodesArray,
7235  */
7236 
7237 /* Python wrapper */
7238 static PyObject *__pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7239 static PyObject *__pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_1__get__(PyObject *__pyx_v_self) {
7240  PyObject *__pyx_r = 0;
7241  __Pyx_RefNannyDeclarations
7242  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7243  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7244 
7245  /* function exit code */
7246  __Pyx_RefNannyFinishContext();
7247  return __pyx_r;
7248 }
7249 
7250 static PyObject *__pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7251  PyObject *__pyx_r = NULL;
7252  __Pyx_RefNannyDeclarations
7253  __Pyx_RefNannySetupContext("__get__", 0);
7254  __Pyx_XDECREF(__pyx_r);
7255  __Pyx_INCREF(((PyObject *)__pyx_v_self->interiorElementBoundariesArray));
7256  __pyx_r = ((PyObject *)__pyx_v_self->interiorElementBoundariesArray);
7257  goto __pyx_L0;
7258 
7259  /* function exit code */
7260  __pyx_L0:;
7261  __Pyx_XGIVEREF(__pyx_r);
7262  __Pyx_RefNannyFinishContext();
7263  return __pyx_r;
7264 }
7265 
7266 /* Python wrapper */
7267 static int __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7268 static int __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7269  int __pyx_r;
7270  __Pyx_RefNannyDeclarations
7271  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7272  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7273 
7274  /* function exit code */
7275  __Pyx_RefNannyFinishContext();
7276  return __pyx_r;
7277 }
7278 
7279 static int __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7280  int __pyx_r;
7281  __Pyx_RefNannyDeclarations
7282  PyObject *__pyx_t_1 = NULL;
7283  __Pyx_RefNannySetupContext("__set__", 0);
7284  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 45, __pyx_L1_error)
7285  __pyx_t_1 = __pyx_v_value;
7286  __Pyx_INCREF(__pyx_t_1);
7287  __Pyx_GIVEREF(__pyx_t_1);
7288  __Pyx_GOTREF(__pyx_v_self->interiorElementBoundariesArray);
7289  __Pyx_DECREF(((PyObject *)__pyx_v_self->interiorElementBoundariesArray));
7290  __pyx_v_self->interiorElementBoundariesArray = ((PyArrayObject *)__pyx_t_1);
7291  __pyx_t_1 = 0;
7292 
7293  /* function exit code */
7294  __pyx_r = 0;
7295  goto __pyx_L0;
7296  __pyx_L1_error:;
7297  __Pyx_XDECREF(__pyx_t_1);
7298  __Pyx_AddTraceback("cmeshTools.CMesh.interiorElementBoundariesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7299  __pyx_r = -1;
7300  __pyx_L0:;
7301  __Pyx_RefNannyFinishContext();
7302  return __pyx_r;
7303 }
7304 
7305 /* Python wrapper */
7306 static int __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7307 static int __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_5__del__(PyObject *__pyx_v_self) {
7308  int __pyx_r;
7309  __Pyx_RefNannyDeclarations
7310  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7311  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7312 
7313  /* function exit code */
7314  __Pyx_RefNannyFinishContext();
7315  return __pyx_r;
7316 }
7317 
7318 static int __pyx_pf_10cmeshTools_5CMesh_30interiorElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7319  int __pyx_r;
7320  __Pyx_RefNannyDeclarations
7321  __Pyx_RefNannySetupContext("__del__", 0);
7322  __Pyx_INCREF(Py_None);
7323  __Pyx_GIVEREF(Py_None);
7324  __Pyx_GOTREF(__pyx_v_self->interiorElementBoundariesArray);
7325  __Pyx_DECREF(((PyObject *)__pyx_v_self->interiorElementBoundariesArray));
7326  __pyx_v_self->interiorElementBoundariesArray = ((PyArrayObject *)Py_None);
7327 
7328  /* function exit code */
7329  __pyx_r = 0;
7330  __Pyx_RefNannyFinishContext();
7331  return __pyx_r;
7332 }
7333 
7334 /* "cmeshTools.pxd":46
7335  * cdef np.ndarray elementBoundaryLocalElementBoundariesArray,
7336  * cdef np.ndarray interiorElementBoundariesArray,
7337  * cdef np.ndarray exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
7338  * cdef np.ndarray edgeNodesArray,
7339  * cdef np.ndarray nodeStarArray,
7340  */
7341 
7342 /* Python wrapper */
7343 static PyObject *__pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7344 static PyObject *__pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_1__get__(PyObject *__pyx_v_self) {
7345  PyObject *__pyx_r = 0;
7346  __Pyx_RefNannyDeclarations
7347  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7348  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7349 
7350  /* function exit code */
7351  __Pyx_RefNannyFinishContext();
7352  return __pyx_r;
7353 }
7354 
7355 static PyObject *__pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7356  PyObject *__pyx_r = NULL;
7357  __Pyx_RefNannyDeclarations
7358  __Pyx_RefNannySetupContext("__get__", 0);
7359  __Pyx_XDECREF(__pyx_r);
7360  __Pyx_INCREF(((PyObject *)__pyx_v_self->exteriorElementBoundariesArray));
7361  __pyx_r = ((PyObject *)__pyx_v_self->exteriorElementBoundariesArray);
7362  goto __pyx_L0;
7363 
7364  /* function exit code */
7365  __pyx_L0:;
7366  __Pyx_XGIVEREF(__pyx_r);
7367  __Pyx_RefNannyFinishContext();
7368  return __pyx_r;
7369 }
7370 
7371 /* Python wrapper */
7372 static int __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7373 static int __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7374  int __pyx_r;
7375  __Pyx_RefNannyDeclarations
7376  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7377  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7378 
7379  /* function exit code */
7380  __Pyx_RefNannyFinishContext();
7381  return __pyx_r;
7382 }
7383 
7384 static int __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7385  int __pyx_r;
7386  __Pyx_RefNannyDeclarations
7387  PyObject *__pyx_t_1 = NULL;
7388  __Pyx_RefNannySetupContext("__set__", 0);
7389  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 46, __pyx_L1_error)
7390  __pyx_t_1 = __pyx_v_value;
7391  __Pyx_INCREF(__pyx_t_1);
7392  __Pyx_GIVEREF(__pyx_t_1);
7393  __Pyx_GOTREF(__pyx_v_self->exteriorElementBoundariesArray);
7394  __Pyx_DECREF(((PyObject *)__pyx_v_self->exteriorElementBoundariesArray));
7395  __pyx_v_self->exteriorElementBoundariesArray = ((PyArrayObject *)__pyx_t_1);
7396  __pyx_t_1 = 0;
7397 
7398  /* function exit code */
7399  __pyx_r = 0;
7400  goto __pyx_L0;
7401  __pyx_L1_error:;
7402  __Pyx_XDECREF(__pyx_t_1);
7403  __Pyx_AddTraceback("cmeshTools.CMesh.exteriorElementBoundariesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7404  __pyx_r = -1;
7405  __pyx_L0:;
7406  __Pyx_RefNannyFinishContext();
7407  return __pyx_r;
7408 }
7409 
7410 /* Python wrapper */
7411 static int __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7412 static int __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_5__del__(PyObject *__pyx_v_self) {
7413  int __pyx_r;
7414  __Pyx_RefNannyDeclarations
7415  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7416  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7417 
7418  /* function exit code */
7419  __Pyx_RefNannyFinishContext();
7420  return __pyx_r;
7421 }
7422 
7423 static int __pyx_pf_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7424  int __pyx_r;
7425  __Pyx_RefNannyDeclarations
7426  __Pyx_RefNannySetupContext("__del__", 0);
7427  __Pyx_INCREF(Py_None);
7428  __Pyx_GIVEREF(Py_None);
7429  __Pyx_GOTREF(__pyx_v_self->exteriorElementBoundariesArray);
7430  __Pyx_DECREF(((PyObject *)__pyx_v_self->exteriorElementBoundariesArray));
7431  __pyx_v_self->exteriorElementBoundariesArray = ((PyArrayObject *)Py_None);
7432 
7433  /* function exit code */
7434  __pyx_r = 0;
7435  __Pyx_RefNannyFinishContext();
7436  return __pyx_r;
7437 }
7438 
7439 /* "cmeshTools.pxd":47
7440  * cdef np.ndarray interiorElementBoundariesArray,
7441  * cdef np.ndarray exteriorElementBoundariesArray,
7442  * cdef np.ndarray edgeNodesArray, # <<<<<<<<<<<<<<
7443  * cdef np.ndarray nodeStarArray,
7444  * cdef np.ndarray nodeStarOffsets,
7445  */
7446 
7447 /* Python wrapper */
7448 static PyObject *__pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7449 static PyObject *__pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_1__get__(PyObject *__pyx_v_self) {
7450  PyObject *__pyx_r = 0;
7451  __Pyx_RefNannyDeclarations
7452  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7453  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7454 
7455  /* function exit code */
7456  __Pyx_RefNannyFinishContext();
7457  return __pyx_r;
7458 }
7459 
7460 static PyObject *__pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7461  PyObject *__pyx_r = NULL;
7462  __Pyx_RefNannyDeclarations
7463  __Pyx_RefNannySetupContext("__get__", 0);
7464  __Pyx_XDECREF(__pyx_r);
7465  __Pyx_INCREF(((PyObject *)__pyx_v_self->edgeNodesArray));
7466  __pyx_r = ((PyObject *)__pyx_v_self->edgeNodesArray);
7467  goto __pyx_L0;
7468 
7469  /* function exit code */
7470  __pyx_L0:;
7471  __Pyx_XGIVEREF(__pyx_r);
7472  __Pyx_RefNannyFinishContext();
7473  return __pyx_r;
7474 }
7475 
7476 /* Python wrapper */
7477 static int __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7478 static int __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7479  int __pyx_r;
7480  __Pyx_RefNannyDeclarations
7481  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7482  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7483 
7484  /* function exit code */
7485  __Pyx_RefNannyFinishContext();
7486  return __pyx_r;
7487 }
7488 
7489 static int __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7490  int __pyx_r;
7491  __Pyx_RefNannyDeclarations
7492  PyObject *__pyx_t_1 = NULL;
7493  __Pyx_RefNannySetupContext("__set__", 0);
7494  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 47, __pyx_L1_error)
7495  __pyx_t_1 = __pyx_v_value;
7496  __Pyx_INCREF(__pyx_t_1);
7497  __Pyx_GIVEREF(__pyx_t_1);
7498  __Pyx_GOTREF(__pyx_v_self->edgeNodesArray);
7499  __Pyx_DECREF(((PyObject *)__pyx_v_self->edgeNodesArray));
7500  __pyx_v_self->edgeNodesArray = ((PyArrayObject *)__pyx_t_1);
7501  __pyx_t_1 = 0;
7502 
7503  /* function exit code */
7504  __pyx_r = 0;
7505  goto __pyx_L0;
7506  __pyx_L1_error:;
7507  __Pyx_XDECREF(__pyx_t_1);
7508  __Pyx_AddTraceback("cmeshTools.CMesh.edgeNodesArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7509  __pyx_r = -1;
7510  __pyx_L0:;
7511  __Pyx_RefNannyFinishContext();
7512  return __pyx_r;
7513 }
7514 
7515 /* Python wrapper */
7516 static int __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7517 static int __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_5__del__(PyObject *__pyx_v_self) {
7518  int __pyx_r;
7519  __Pyx_RefNannyDeclarations
7520  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7521  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7522 
7523  /* function exit code */
7524  __Pyx_RefNannyFinishContext();
7525  return __pyx_r;
7526 }
7527 
7528 static int __pyx_pf_10cmeshTools_5CMesh_14edgeNodesArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7529  int __pyx_r;
7530  __Pyx_RefNannyDeclarations
7531  __Pyx_RefNannySetupContext("__del__", 0);
7532  __Pyx_INCREF(Py_None);
7533  __Pyx_GIVEREF(Py_None);
7534  __Pyx_GOTREF(__pyx_v_self->edgeNodesArray);
7535  __Pyx_DECREF(((PyObject *)__pyx_v_self->edgeNodesArray));
7536  __pyx_v_self->edgeNodesArray = ((PyArrayObject *)Py_None);
7537 
7538  /* function exit code */
7539  __pyx_r = 0;
7540  __Pyx_RefNannyFinishContext();
7541  return __pyx_r;
7542 }
7543 
7544 /* "cmeshTools.pxd":48
7545  * cdef np.ndarray exteriorElementBoundariesArray,
7546  * cdef np.ndarray edgeNodesArray,
7547  * cdef np.ndarray nodeStarArray, # <<<<<<<<<<<<<<
7548  * cdef np.ndarray nodeStarOffsets,
7549  * cdef np.ndarray elementMaterialTypes,
7550  */
7551 
7552 /* Python wrapper */
7553 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_1__get__(PyObject *__pyx_v_self); /*proto*/
7554 static PyObject *__pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_1__get__(PyObject *__pyx_v_self) {
7555  PyObject *__pyx_r = 0;
7556  __Pyx_RefNannyDeclarations
7557  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7558  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7559 
7560  /* function exit code */
7561  __Pyx_RefNannyFinishContext();
7562  return __pyx_r;
7563 }
7564 
7565 static PyObject *__pyx_pf_10cmeshTools_5CMesh_13nodeStarArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7566  PyObject *__pyx_r = NULL;
7567  __Pyx_RefNannyDeclarations
7568  __Pyx_RefNannySetupContext("__get__", 0);
7569  __Pyx_XDECREF(__pyx_r);
7570  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeStarArray));
7571  __pyx_r = ((PyObject *)__pyx_v_self->nodeStarArray);
7572  goto __pyx_L0;
7573 
7574  /* function exit code */
7575  __pyx_L0:;
7576  __Pyx_XGIVEREF(__pyx_r);
7577  __Pyx_RefNannyFinishContext();
7578  return __pyx_r;
7579 }
7580 
7581 /* Python wrapper */
7582 static int __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7583 static int __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7584  int __pyx_r;
7585  __Pyx_RefNannyDeclarations
7586  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7587  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7588 
7589  /* function exit code */
7590  __Pyx_RefNannyFinishContext();
7591  return __pyx_r;
7592 }
7593 
7594 static int __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7595  int __pyx_r;
7596  __Pyx_RefNannyDeclarations
7597  PyObject *__pyx_t_1 = NULL;
7598  __Pyx_RefNannySetupContext("__set__", 0);
7599  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 48, __pyx_L1_error)
7600  __pyx_t_1 = __pyx_v_value;
7601  __Pyx_INCREF(__pyx_t_1);
7602  __Pyx_GIVEREF(__pyx_t_1);
7603  __Pyx_GOTREF(__pyx_v_self->nodeStarArray);
7604  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarArray));
7605  __pyx_v_self->nodeStarArray = ((PyArrayObject *)__pyx_t_1);
7606  __pyx_t_1 = 0;
7607 
7608  /* function exit code */
7609  __pyx_r = 0;
7610  goto __pyx_L0;
7611  __pyx_L1_error:;
7612  __Pyx_XDECREF(__pyx_t_1);
7613  __Pyx_AddTraceback("cmeshTools.CMesh.nodeStarArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7614  __pyx_r = -1;
7615  __pyx_L0:;
7616  __Pyx_RefNannyFinishContext();
7617  return __pyx_r;
7618 }
7619 
7620 /* Python wrapper */
7621 static int __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_5__del__(PyObject *__pyx_v_self); /*proto*/
7622 static int __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_5__del__(PyObject *__pyx_v_self) {
7623  int __pyx_r;
7624  __Pyx_RefNannyDeclarations
7625  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7626  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7627 
7628  /* function exit code */
7629  __Pyx_RefNannyFinishContext();
7630  return __pyx_r;
7631 }
7632 
7633 static int __pyx_pf_10cmeshTools_5CMesh_13nodeStarArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7634  int __pyx_r;
7635  __Pyx_RefNannyDeclarations
7636  __Pyx_RefNannySetupContext("__del__", 0);
7637  __Pyx_INCREF(Py_None);
7638  __Pyx_GIVEREF(Py_None);
7639  __Pyx_GOTREF(__pyx_v_self->nodeStarArray);
7640  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarArray));
7641  __pyx_v_self->nodeStarArray = ((PyArrayObject *)Py_None);
7642 
7643  /* function exit code */
7644  __pyx_r = 0;
7645  __Pyx_RefNannyFinishContext();
7646  return __pyx_r;
7647 }
7648 
7649 /* "cmeshTools.pxd":49
7650  * cdef np.ndarray edgeNodesArray,
7651  * cdef np.ndarray nodeStarArray,
7652  * cdef np.ndarray nodeStarOffsets, # <<<<<<<<<<<<<<
7653  * cdef np.ndarray elementMaterialTypes,
7654  * cdef np.ndarray elementBoundaryMaterialTypes,
7655  */
7656 
7657 /* Python wrapper */
7658 static PyObject *__pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
7659 static PyObject *__pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_1__get__(PyObject *__pyx_v_self) {
7660  PyObject *__pyx_r = 0;
7661  __Pyx_RefNannyDeclarations
7662  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7663  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7664 
7665  /* function exit code */
7666  __Pyx_RefNannyFinishContext();
7667  return __pyx_r;
7668 }
7669 
7670 static PyObject *__pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7671  PyObject *__pyx_r = NULL;
7672  __Pyx_RefNannyDeclarations
7673  __Pyx_RefNannySetupContext("__get__", 0);
7674  __Pyx_XDECREF(__pyx_r);
7675  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeStarOffsets));
7676  __pyx_r = ((PyObject *)__pyx_v_self->nodeStarOffsets);
7677  goto __pyx_L0;
7678 
7679  /* function exit code */
7680  __pyx_L0:;
7681  __Pyx_XGIVEREF(__pyx_r);
7682  __Pyx_RefNannyFinishContext();
7683  return __pyx_r;
7684 }
7685 
7686 /* Python wrapper */
7687 static int __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7688 static int __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7689  int __pyx_r;
7690  __Pyx_RefNannyDeclarations
7691  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7692  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7693 
7694  /* function exit code */
7695  __Pyx_RefNannyFinishContext();
7696  return __pyx_r;
7697 }
7698 
7699 static int __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7700  int __pyx_r;
7701  __Pyx_RefNannyDeclarations
7702  PyObject *__pyx_t_1 = NULL;
7703  __Pyx_RefNannySetupContext("__set__", 0);
7704  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 49, __pyx_L1_error)
7705  __pyx_t_1 = __pyx_v_value;
7706  __Pyx_INCREF(__pyx_t_1);
7707  __Pyx_GIVEREF(__pyx_t_1);
7708  __Pyx_GOTREF(__pyx_v_self->nodeStarOffsets);
7709  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarOffsets));
7710  __pyx_v_self->nodeStarOffsets = ((PyArrayObject *)__pyx_t_1);
7711  __pyx_t_1 = 0;
7712 
7713  /* function exit code */
7714  __pyx_r = 0;
7715  goto __pyx_L0;
7716  __pyx_L1_error:;
7717  __Pyx_XDECREF(__pyx_t_1);
7718  __Pyx_AddTraceback("cmeshTools.CMesh.nodeStarOffsets.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7719  __pyx_r = -1;
7720  __pyx_L0:;
7721  __Pyx_RefNannyFinishContext();
7722  return __pyx_r;
7723 }
7724 
7725 /* Python wrapper */
7726 static int __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_5__del__(PyObject *__pyx_v_self); /*proto*/
7727 static int __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_5__del__(PyObject *__pyx_v_self) {
7728  int __pyx_r;
7729  __Pyx_RefNannyDeclarations
7730  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7731  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7732 
7733  /* function exit code */
7734  __Pyx_RefNannyFinishContext();
7735  return __pyx_r;
7736 }
7737 
7738 static int __pyx_pf_10cmeshTools_5CMesh_15nodeStarOffsets_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7739  int __pyx_r;
7740  __Pyx_RefNannyDeclarations
7741  __Pyx_RefNannySetupContext("__del__", 0);
7742  __Pyx_INCREF(Py_None);
7743  __Pyx_GIVEREF(Py_None);
7744  __Pyx_GOTREF(__pyx_v_self->nodeStarOffsets);
7745  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeStarOffsets));
7746  __pyx_v_self->nodeStarOffsets = ((PyArrayObject *)Py_None);
7747 
7748  /* function exit code */
7749  __pyx_r = 0;
7750  __Pyx_RefNannyFinishContext();
7751  return __pyx_r;
7752 }
7753 
7754 /* "cmeshTools.pxd":50
7755  * cdef np.ndarray nodeStarArray,
7756  * cdef np.ndarray nodeStarOffsets,
7757  * cdef np.ndarray elementMaterialTypes, # <<<<<<<<<<<<<<
7758  * cdef np.ndarray elementBoundaryMaterialTypes,
7759  * cdef np.ndarray nodeMaterialTypes,
7760  */
7761 
7762 /* Python wrapper */
7763 static PyObject *__pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_1__get__(PyObject *__pyx_v_self); /*proto*/
7764 static PyObject *__pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_1__get__(PyObject *__pyx_v_self) {
7765  PyObject *__pyx_r = 0;
7766  __Pyx_RefNannyDeclarations
7767  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7768  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7769 
7770  /* function exit code */
7771  __Pyx_RefNannyFinishContext();
7772  return __pyx_r;
7773 }
7774 
7775 static PyObject *__pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7776  PyObject *__pyx_r = NULL;
7777  __Pyx_RefNannyDeclarations
7778  __Pyx_RefNannySetupContext("__get__", 0);
7779  __Pyx_XDECREF(__pyx_r);
7780  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementMaterialTypes));
7781  __pyx_r = ((PyObject *)__pyx_v_self->elementMaterialTypes);
7782  goto __pyx_L0;
7783 
7784  /* function exit code */
7785  __pyx_L0:;
7786  __Pyx_XGIVEREF(__pyx_r);
7787  __Pyx_RefNannyFinishContext();
7788  return __pyx_r;
7789 }
7790 
7791 /* Python wrapper */
7792 static int __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7793 static int __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7794  int __pyx_r;
7795  __Pyx_RefNannyDeclarations
7796  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7797  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7798 
7799  /* function exit code */
7800  __Pyx_RefNannyFinishContext();
7801  return __pyx_r;
7802 }
7803 
7804 static int __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7805  int __pyx_r;
7806  __Pyx_RefNannyDeclarations
7807  PyObject *__pyx_t_1 = NULL;
7808  __Pyx_RefNannySetupContext("__set__", 0);
7809  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 50, __pyx_L1_error)
7810  __pyx_t_1 = __pyx_v_value;
7811  __Pyx_INCREF(__pyx_t_1);
7812  __Pyx_GIVEREF(__pyx_t_1);
7813  __Pyx_GOTREF(__pyx_v_self->elementMaterialTypes);
7814  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementMaterialTypes));
7815  __pyx_v_self->elementMaterialTypes = ((PyArrayObject *)__pyx_t_1);
7816  __pyx_t_1 = 0;
7817 
7818  /* function exit code */
7819  __pyx_r = 0;
7820  goto __pyx_L0;
7821  __pyx_L1_error:;
7822  __Pyx_XDECREF(__pyx_t_1);
7823  __Pyx_AddTraceback("cmeshTools.CMesh.elementMaterialTypes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7824  __pyx_r = -1;
7825  __pyx_L0:;
7826  __Pyx_RefNannyFinishContext();
7827  return __pyx_r;
7828 }
7829 
7830 /* Python wrapper */
7831 static int __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_5__del__(PyObject *__pyx_v_self); /*proto*/
7832 static int __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_5__del__(PyObject *__pyx_v_self) {
7833  int __pyx_r;
7834  __Pyx_RefNannyDeclarations
7835  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7836  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7837 
7838  /* function exit code */
7839  __Pyx_RefNannyFinishContext();
7840  return __pyx_r;
7841 }
7842 
7843 static int __pyx_pf_10cmeshTools_5CMesh_20elementMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7844  int __pyx_r;
7845  __Pyx_RefNannyDeclarations
7846  __Pyx_RefNannySetupContext("__del__", 0);
7847  __Pyx_INCREF(Py_None);
7848  __Pyx_GIVEREF(Py_None);
7849  __Pyx_GOTREF(__pyx_v_self->elementMaterialTypes);
7850  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementMaterialTypes));
7851  __pyx_v_self->elementMaterialTypes = ((PyArrayObject *)Py_None);
7852 
7853  /* function exit code */
7854  __pyx_r = 0;
7855  __Pyx_RefNannyFinishContext();
7856  return __pyx_r;
7857 }
7858 
7859 /* "cmeshTools.pxd":51
7860  * cdef np.ndarray nodeStarOffsets,
7861  * cdef np.ndarray elementMaterialTypes,
7862  * cdef np.ndarray elementBoundaryMaterialTypes, # <<<<<<<<<<<<<<
7863  * cdef np.ndarray nodeMaterialTypes,
7864  * cdef np.ndarray nodeArray,
7865  */
7866 
7867 /* Python wrapper */
7868 static PyObject *__pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_1__get__(PyObject *__pyx_v_self); /*proto*/
7869 static PyObject *__pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_1__get__(PyObject *__pyx_v_self) {
7870  PyObject *__pyx_r = 0;
7871  __Pyx_RefNannyDeclarations
7872  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7873  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7874 
7875  /* function exit code */
7876  __Pyx_RefNannyFinishContext();
7877  return __pyx_r;
7878 }
7879 
7880 static PyObject *__pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7881  PyObject *__pyx_r = NULL;
7882  __Pyx_RefNannyDeclarations
7883  __Pyx_RefNannySetupContext("__get__", 0);
7884  __Pyx_XDECREF(__pyx_r);
7885  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryMaterialTypes));
7886  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryMaterialTypes);
7887  goto __pyx_L0;
7888 
7889  /* function exit code */
7890  __pyx_L0:;
7891  __Pyx_XGIVEREF(__pyx_r);
7892  __Pyx_RefNannyFinishContext();
7893  return __pyx_r;
7894 }
7895 
7896 /* Python wrapper */
7897 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
7898 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
7899  int __pyx_r;
7900  __Pyx_RefNannyDeclarations
7901  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
7902  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
7903 
7904  /* function exit code */
7905  __Pyx_RefNannyFinishContext();
7906  return __pyx_r;
7907 }
7908 
7909 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
7910  int __pyx_r;
7911  __Pyx_RefNannyDeclarations
7912  PyObject *__pyx_t_1 = NULL;
7913  __Pyx_RefNannySetupContext("__set__", 0);
7914  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 51, __pyx_L1_error)
7915  __pyx_t_1 = __pyx_v_value;
7916  __Pyx_INCREF(__pyx_t_1);
7917  __Pyx_GIVEREF(__pyx_t_1);
7918  __Pyx_GOTREF(__pyx_v_self->elementBoundaryMaterialTypes);
7919  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryMaterialTypes));
7920  __pyx_v_self->elementBoundaryMaterialTypes = ((PyArrayObject *)__pyx_t_1);
7921  __pyx_t_1 = 0;
7922 
7923  /* function exit code */
7924  __pyx_r = 0;
7925  goto __pyx_L0;
7926  __pyx_L1_error:;
7927  __Pyx_XDECREF(__pyx_t_1);
7928  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryMaterialTypes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
7929  __pyx_r = -1;
7930  __pyx_L0:;
7931  __Pyx_RefNannyFinishContext();
7932  return __pyx_r;
7933 }
7934 
7935 /* Python wrapper */
7936 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_5__del__(PyObject *__pyx_v_self); /*proto*/
7937 static int __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_5__del__(PyObject *__pyx_v_self) {
7938  int __pyx_r;
7939  __Pyx_RefNannyDeclarations
7940  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
7941  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7942 
7943  /* function exit code */
7944  __Pyx_RefNannyFinishContext();
7945  return __pyx_r;
7946 }
7947 
7948 static int __pyx_pf_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7949  int __pyx_r;
7950  __Pyx_RefNannyDeclarations
7951  __Pyx_RefNannySetupContext("__del__", 0);
7952  __Pyx_INCREF(Py_None);
7953  __Pyx_GIVEREF(Py_None);
7954  __Pyx_GOTREF(__pyx_v_self->elementBoundaryMaterialTypes);
7955  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryMaterialTypes));
7956  __pyx_v_self->elementBoundaryMaterialTypes = ((PyArrayObject *)Py_None);
7957 
7958  /* function exit code */
7959  __pyx_r = 0;
7960  __Pyx_RefNannyFinishContext();
7961  return __pyx_r;
7962 }
7963 
7964 /* "cmeshTools.pxd":52
7965  * cdef np.ndarray elementMaterialTypes,
7966  * cdef np.ndarray elementBoundaryMaterialTypes,
7967  * cdef np.ndarray nodeMaterialTypes, # <<<<<<<<<<<<<<
7968  * cdef np.ndarray nodeArray,
7969  *
7970  */
7971 
7972 /* Python wrapper */
7973 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_1__get__(PyObject *__pyx_v_self); /*proto*/
7974 static PyObject *__pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_1__get__(PyObject *__pyx_v_self) {
7975  PyObject *__pyx_r = 0;
7976  __Pyx_RefNannyDeclarations
7977  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
7978  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
7979 
7980  /* function exit code */
7981  __Pyx_RefNannyFinishContext();
7982  return __pyx_r;
7983 }
7984 
7985 static PyObject *__pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
7986  PyObject *__pyx_r = NULL;
7987  __Pyx_RefNannyDeclarations
7988  __Pyx_RefNannySetupContext("__get__", 0);
7989  __Pyx_XDECREF(__pyx_r);
7990  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeMaterialTypes));
7991  __pyx_r = ((PyObject *)__pyx_v_self->nodeMaterialTypes);
7992  goto __pyx_L0;
7993 
7994  /* function exit code */
7995  __pyx_L0:;
7996  __Pyx_XGIVEREF(__pyx_r);
7997  __Pyx_RefNannyFinishContext();
7998  return __pyx_r;
7999 }
8000 
8001 /* Python wrapper */
8002 static int __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8003 static int __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8004  int __pyx_r;
8005  __Pyx_RefNannyDeclarations
8006  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8007  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8008 
8009  /* function exit code */
8010  __Pyx_RefNannyFinishContext();
8011  return __pyx_r;
8012 }
8013 
8014 static int __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8015  int __pyx_r;
8016  __Pyx_RefNannyDeclarations
8017  PyObject *__pyx_t_1 = NULL;
8018  __Pyx_RefNannySetupContext("__set__", 0);
8019  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 52, __pyx_L1_error)
8020  __pyx_t_1 = __pyx_v_value;
8021  __Pyx_INCREF(__pyx_t_1);
8022  __Pyx_GIVEREF(__pyx_t_1);
8023  __Pyx_GOTREF(__pyx_v_self->nodeMaterialTypes);
8024  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeMaterialTypes));
8025  __pyx_v_self->nodeMaterialTypes = ((PyArrayObject *)__pyx_t_1);
8026  __pyx_t_1 = 0;
8027 
8028  /* function exit code */
8029  __pyx_r = 0;
8030  goto __pyx_L0;
8031  __pyx_L1_error:;
8032  __Pyx_XDECREF(__pyx_t_1);
8033  __Pyx_AddTraceback("cmeshTools.CMesh.nodeMaterialTypes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8034  __pyx_r = -1;
8035  __pyx_L0:;
8036  __Pyx_RefNannyFinishContext();
8037  return __pyx_r;
8038 }
8039 
8040 /* Python wrapper */
8041 static int __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_5__del__(PyObject *__pyx_v_self); /*proto*/
8042 static int __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_5__del__(PyObject *__pyx_v_self) {
8043  int __pyx_r;
8044  __Pyx_RefNannyDeclarations
8045  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
8046  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8047 
8048  /* function exit code */
8049  __Pyx_RefNannyFinishContext();
8050  return __pyx_r;
8051 }
8052 
8053 static int __pyx_pf_10cmeshTools_5CMesh_17nodeMaterialTypes_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8054  int __pyx_r;
8055  __Pyx_RefNannyDeclarations
8056  __Pyx_RefNannySetupContext("__del__", 0);
8057  __Pyx_INCREF(Py_None);
8058  __Pyx_GIVEREF(Py_None);
8059  __Pyx_GOTREF(__pyx_v_self->nodeMaterialTypes);
8060  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeMaterialTypes));
8061  __pyx_v_self->nodeMaterialTypes = ((PyArrayObject *)Py_None);
8062 
8063  /* function exit code */
8064  __pyx_r = 0;
8065  __Pyx_RefNannyFinishContext();
8066  return __pyx_r;
8067 }
8068 
8069 /* "cmeshTools.pxd":53
8070  * cdef np.ndarray elementBoundaryMaterialTypes,
8071  * cdef np.ndarray nodeMaterialTypes,
8072  * cdef np.ndarray nodeArray, # <<<<<<<<<<<<<<
8073  *
8074  * cdef int nx
8075  */
8076 
8077 /* Python wrapper */
8078 static PyObject *__pyx_pw_10cmeshTools_5CMesh_9nodeArray_1__get__(PyObject *__pyx_v_self); /*proto*/
8079 static PyObject *__pyx_pw_10cmeshTools_5CMesh_9nodeArray_1__get__(PyObject *__pyx_v_self) {
8080  PyObject *__pyx_r = 0;
8081  __Pyx_RefNannyDeclarations
8082  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8083  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_9nodeArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8084 
8085  /* function exit code */
8086  __Pyx_RefNannyFinishContext();
8087  return __pyx_r;
8088 }
8089 
8090 static PyObject *__pyx_pf_10cmeshTools_5CMesh_9nodeArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8091  PyObject *__pyx_r = NULL;
8092  __Pyx_RefNannyDeclarations
8093  __Pyx_RefNannySetupContext("__get__", 0);
8094  __Pyx_XDECREF(__pyx_r);
8095  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeArray));
8096  __pyx_r = ((PyObject *)__pyx_v_self->nodeArray);
8097  goto __pyx_L0;
8098 
8099  /* function exit code */
8100  __pyx_L0:;
8101  __Pyx_XGIVEREF(__pyx_r);
8102  __Pyx_RefNannyFinishContext();
8103  return __pyx_r;
8104 }
8105 
8106 /* Python wrapper */
8107 static int __pyx_pw_10cmeshTools_5CMesh_9nodeArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8108 static int __pyx_pw_10cmeshTools_5CMesh_9nodeArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8109  int __pyx_r;
8110  __Pyx_RefNannyDeclarations
8111  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8112  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_9nodeArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8113 
8114  /* function exit code */
8115  __Pyx_RefNannyFinishContext();
8116  return __pyx_r;
8117 }
8118 
8119 static int __pyx_pf_10cmeshTools_5CMesh_9nodeArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8120  int __pyx_r;
8121  __Pyx_RefNannyDeclarations
8122  PyObject *__pyx_t_1 = NULL;
8123  __Pyx_RefNannySetupContext("__set__", 0);
8124  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 53, __pyx_L1_error)
8125  __pyx_t_1 = __pyx_v_value;
8126  __Pyx_INCREF(__pyx_t_1);
8127  __Pyx_GIVEREF(__pyx_t_1);
8128  __Pyx_GOTREF(__pyx_v_self->nodeArray);
8129  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeArray));
8130  __pyx_v_self->nodeArray = ((PyArrayObject *)__pyx_t_1);
8131  __pyx_t_1 = 0;
8132 
8133  /* function exit code */
8134  __pyx_r = 0;
8135  goto __pyx_L0;
8136  __pyx_L1_error:;
8137  __Pyx_XDECREF(__pyx_t_1);
8138  __Pyx_AddTraceback("cmeshTools.CMesh.nodeArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8139  __pyx_r = -1;
8140  __pyx_L0:;
8141  __Pyx_RefNannyFinishContext();
8142  return __pyx_r;
8143 }
8144 
8145 /* Python wrapper */
8146 static int __pyx_pw_10cmeshTools_5CMesh_9nodeArray_5__del__(PyObject *__pyx_v_self); /*proto*/
8147 static int __pyx_pw_10cmeshTools_5CMesh_9nodeArray_5__del__(PyObject *__pyx_v_self) {
8148  int __pyx_r;
8149  __Pyx_RefNannyDeclarations
8150  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
8151  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_9nodeArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8152 
8153  /* function exit code */
8154  __Pyx_RefNannyFinishContext();
8155  return __pyx_r;
8156 }
8157 
8158 static int __pyx_pf_10cmeshTools_5CMesh_9nodeArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8159  int __pyx_r;
8160  __Pyx_RefNannyDeclarations
8161  __Pyx_RefNannySetupContext("__del__", 0);
8162  __Pyx_INCREF(Py_None);
8163  __Pyx_GIVEREF(Py_None);
8164  __Pyx_GOTREF(__pyx_v_self->nodeArray);
8165  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeArray));
8166  __pyx_v_self->nodeArray = ((PyArrayObject *)Py_None);
8167 
8168  /* function exit code */
8169  __pyx_r = 0;
8170  __Pyx_RefNannyFinishContext();
8171  return __pyx_r;
8172 }
8173 
8174 /* "cmeshTools.pxd":55
8175  * cdef np.ndarray nodeArray,
8176  *
8177  * cdef int nx # <<<<<<<<<<<<<<
8178  * cdef int ny
8179  * cdef int nz #NURBS
8180  */
8181 
8182 /* Python wrapper */
8183 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2nx_1__get__(PyObject *__pyx_v_self); /*proto*/
8184 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2nx_1__get__(PyObject *__pyx_v_self) {
8185  PyObject *__pyx_r = 0;
8186  __Pyx_RefNannyDeclarations
8187  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8188  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2nx___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8189 
8190  /* function exit code */
8191  __Pyx_RefNannyFinishContext();
8192  return __pyx_r;
8193 }
8194 
8195 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2nx___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8196  PyObject *__pyx_r = NULL;
8197  __Pyx_RefNannyDeclarations
8198  PyObject *__pyx_t_1 = NULL;
8199  __Pyx_RefNannySetupContext("__get__", 0);
8200  __Pyx_XDECREF(__pyx_r);
8201  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nx); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 55, __pyx_L1_error)
8202  __Pyx_GOTREF(__pyx_t_1);
8203  __pyx_r = __pyx_t_1;
8204  __pyx_t_1 = 0;
8205  goto __pyx_L0;
8206 
8207  /* function exit code */
8208  __pyx_L1_error:;
8209  __Pyx_XDECREF(__pyx_t_1);
8210  __Pyx_AddTraceback("cmeshTools.CMesh.nx.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8211  __pyx_r = NULL;
8212  __pyx_L0:;
8213  __Pyx_XGIVEREF(__pyx_r);
8214  __Pyx_RefNannyFinishContext();
8215  return __pyx_r;
8216 }
8217 
8218 /* Python wrapper */
8219 static int __pyx_pw_10cmeshTools_5CMesh_2nx_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8220 static int __pyx_pw_10cmeshTools_5CMesh_2nx_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8221  int __pyx_r;
8222  __Pyx_RefNannyDeclarations
8223  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8224  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2nx_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8225 
8226  /* function exit code */
8227  __Pyx_RefNannyFinishContext();
8228  return __pyx_r;
8229 }
8230 
8231 static int __pyx_pf_10cmeshTools_5CMesh_2nx_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8232  int __pyx_r;
8233  __Pyx_RefNannyDeclarations
8234  int __pyx_t_1;
8235  __Pyx_RefNannySetupContext("__set__", 0);
8236  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 55, __pyx_L1_error)
8237  __pyx_v_self->nx = __pyx_t_1;
8238 
8239  /* function exit code */
8240  __pyx_r = 0;
8241  goto __pyx_L0;
8242  __pyx_L1_error:;
8243  __Pyx_AddTraceback("cmeshTools.CMesh.nx.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8244  __pyx_r = -1;
8245  __pyx_L0:;
8246  __Pyx_RefNannyFinishContext();
8247  return __pyx_r;
8248 }
8249 
8250 /* "cmeshTools.pxd":56
8251  *
8252  * cdef int nx
8253  * cdef int ny # <<<<<<<<<<<<<<
8254  * cdef int nz #NURBS
8255  * cdef int px
8256  */
8257 
8258 /* Python wrapper */
8259 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2ny_1__get__(PyObject *__pyx_v_self); /*proto*/
8260 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2ny_1__get__(PyObject *__pyx_v_self) {
8261  PyObject *__pyx_r = 0;
8262  __Pyx_RefNannyDeclarations
8263  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8264  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2ny___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8265 
8266  /* function exit code */
8267  __Pyx_RefNannyFinishContext();
8268  return __pyx_r;
8269 }
8270 
8271 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2ny___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8272  PyObject *__pyx_r = NULL;
8273  __Pyx_RefNannyDeclarations
8274  PyObject *__pyx_t_1 = NULL;
8275  __Pyx_RefNannySetupContext("__get__", 0);
8276  __Pyx_XDECREF(__pyx_r);
8277  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->ny); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 56, __pyx_L1_error)
8278  __Pyx_GOTREF(__pyx_t_1);
8279  __pyx_r = __pyx_t_1;
8280  __pyx_t_1 = 0;
8281  goto __pyx_L0;
8282 
8283  /* function exit code */
8284  __pyx_L1_error:;
8285  __Pyx_XDECREF(__pyx_t_1);
8286  __Pyx_AddTraceback("cmeshTools.CMesh.ny.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8287  __pyx_r = NULL;
8288  __pyx_L0:;
8289  __Pyx_XGIVEREF(__pyx_r);
8290  __Pyx_RefNannyFinishContext();
8291  return __pyx_r;
8292 }
8293 
8294 /* Python wrapper */
8295 static int __pyx_pw_10cmeshTools_5CMesh_2ny_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8296 static int __pyx_pw_10cmeshTools_5CMesh_2ny_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8297  int __pyx_r;
8298  __Pyx_RefNannyDeclarations
8299  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8300  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2ny_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8301 
8302  /* function exit code */
8303  __Pyx_RefNannyFinishContext();
8304  return __pyx_r;
8305 }
8306 
8307 static int __pyx_pf_10cmeshTools_5CMesh_2ny_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8308  int __pyx_r;
8309  __Pyx_RefNannyDeclarations
8310  int __pyx_t_1;
8311  __Pyx_RefNannySetupContext("__set__", 0);
8312  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 56, __pyx_L1_error)
8313  __pyx_v_self->ny = __pyx_t_1;
8314 
8315  /* function exit code */
8316  __pyx_r = 0;
8317  goto __pyx_L0;
8318  __pyx_L1_error:;
8319  __Pyx_AddTraceback("cmeshTools.CMesh.ny.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8320  __pyx_r = -1;
8321  __pyx_L0:;
8322  __Pyx_RefNannyFinishContext();
8323  return __pyx_r;
8324 }
8325 
8326 /* "cmeshTools.pxd":57
8327  * cdef int nx
8328  * cdef int ny
8329  * cdef int nz #NURBS # <<<<<<<<<<<<<<
8330  * cdef int px
8331  * cdef int py
8332  */
8333 
8334 /* Python wrapper */
8335 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2nz_1__get__(PyObject *__pyx_v_self); /*proto*/
8336 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2nz_1__get__(PyObject *__pyx_v_self) {
8337  PyObject *__pyx_r = 0;
8338  __Pyx_RefNannyDeclarations
8339  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8340  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2nz___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8341 
8342  /* function exit code */
8343  __Pyx_RefNannyFinishContext();
8344  return __pyx_r;
8345 }
8346 
8347 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2nz___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8348  PyObject *__pyx_r = NULL;
8349  __Pyx_RefNannyDeclarations
8350  PyObject *__pyx_t_1 = NULL;
8351  __Pyx_RefNannySetupContext("__get__", 0);
8352  __Pyx_XDECREF(__pyx_r);
8353  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nz); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 57, __pyx_L1_error)
8354  __Pyx_GOTREF(__pyx_t_1);
8355  __pyx_r = __pyx_t_1;
8356  __pyx_t_1 = 0;
8357  goto __pyx_L0;
8358 
8359  /* function exit code */
8360  __pyx_L1_error:;
8361  __Pyx_XDECREF(__pyx_t_1);
8362  __Pyx_AddTraceback("cmeshTools.CMesh.nz.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8363  __pyx_r = NULL;
8364  __pyx_L0:;
8365  __Pyx_XGIVEREF(__pyx_r);
8366  __Pyx_RefNannyFinishContext();
8367  return __pyx_r;
8368 }
8369 
8370 /* Python wrapper */
8371 static int __pyx_pw_10cmeshTools_5CMesh_2nz_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8372 static int __pyx_pw_10cmeshTools_5CMesh_2nz_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8373  int __pyx_r;
8374  __Pyx_RefNannyDeclarations
8375  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8376  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2nz_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8377 
8378  /* function exit code */
8379  __Pyx_RefNannyFinishContext();
8380  return __pyx_r;
8381 }
8382 
8383 static int __pyx_pf_10cmeshTools_5CMesh_2nz_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8384  int __pyx_r;
8385  __Pyx_RefNannyDeclarations
8386  int __pyx_t_1;
8387  __Pyx_RefNannySetupContext("__set__", 0);
8388  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 57, __pyx_L1_error)
8389  __pyx_v_self->nz = __pyx_t_1;
8390 
8391  /* function exit code */
8392  __pyx_r = 0;
8393  goto __pyx_L0;
8394  __pyx_L1_error:;
8395  __Pyx_AddTraceback("cmeshTools.CMesh.nz.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8396  __pyx_r = -1;
8397  __pyx_L0:;
8398  __Pyx_RefNannyFinishContext();
8399  return __pyx_r;
8400 }
8401 
8402 /* "cmeshTools.pxd":58
8403  * cdef int ny
8404  * cdef int nz #NURBS
8405  * cdef int px # <<<<<<<<<<<<<<
8406  * cdef int py
8407  * cdef int pz, #NURBS
8408  */
8409 
8410 /* Python wrapper */
8411 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2px_1__get__(PyObject *__pyx_v_self); /*proto*/
8412 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2px_1__get__(PyObject *__pyx_v_self) {
8413  PyObject *__pyx_r = 0;
8414  __Pyx_RefNannyDeclarations
8415  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8416  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2px___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8417 
8418  /* function exit code */
8419  __Pyx_RefNannyFinishContext();
8420  return __pyx_r;
8421 }
8422 
8423 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2px___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8424  PyObject *__pyx_r = NULL;
8425  __Pyx_RefNannyDeclarations
8426  PyObject *__pyx_t_1 = NULL;
8427  __Pyx_RefNannySetupContext("__get__", 0);
8428  __Pyx_XDECREF(__pyx_r);
8429  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->px); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 58, __pyx_L1_error)
8430  __Pyx_GOTREF(__pyx_t_1);
8431  __pyx_r = __pyx_t_1;
8432  __pyx_t_1 = 0;
8433  goto __pyx_L0;
8434 
8435  /* function exit code */
8436  __pyx_L1_error:;
8437  __Pyx_XDECREF(__pyx_t_1);
8438  __Pyx_AddTraceback("cmeshTools.CMesh.px.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8439  __pyx_r = NULL;
8440  __pyx_L0:;
8441  __Pyx_XGIVEREF(__pyx_r);
8442  __Pyx_RefNannyFinishContext();
8443  return __pyx_r;
8444 }
8445 
8446 /* Python wrapper */
8447 static int __pyx_pw_10cmeshTools_5CMesh_2px_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8448 static int __pyx_pw_10cmeshTools_5CMesh_2px_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8449  int __pyx_r;
8450  __Pyx_RefNannyDeclarations
8451  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8452  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2px_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8453 
8454  /* function exit code */
8455  __Pyx_RefNannyFinishContext();
8456  return __pyx_r;
8457 }
8458 
8459 static int __pyx_pf_10cmeshTools_5CMesh_2px_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8460  int __pyx_r;
8461  __Pyx_RefNannyDeclarations
8462  int __pyx_t_1;
8463  __Pyx_RefNannySetupContext("__set__", 0);
8464  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 58, __pyx_L1_error)
8465  __pyx_v_self->px = __pyx_t_1;
8466 
8467  /* function exit code */
8468  __pyx_r = 0;
8469  goto __pyx_L0;
8470  __pyx_L1_error:;
8471  __Pyx_AddTraceback("cmeshTools.CMesh.px.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8472  __pyx_r = -1;
8473  __pyx_L0:;
8474  __Pyx_RefNannyFinishContext();
8475  return __pyx_r;
8476 }
8477 
8478 /* "cmeshTools.pxd":59
8479  * cdef int nz #NURBS
8480  * cdef int px
8481  * cdef int py # <<<<<<<<<<<<<<
8482  * cdef int pz, #NURBS
8483  * # cdef int[:] elementIJK, #NURBS
8484  */
8485 
8486 /* Python wrapper */
8487 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2py_1__get__(PyObject *__pyx_v_self); /*proto*/
8488 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2py_1__get__(PyObject *__pyx_v_self) {
8489  PyObject *__pyx_r = 0;
8490  __Pyx_RefNannyDeclarations
8491  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8492  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2py___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8493 
8494  /* function exit code */
8495  __Pyx_RefNannyFinishContext();
8496  return __pyx_r;
8497 }
8498 
8499 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2py___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8500  PyObject *__pyx_r = NULL;
8501  __Pyx_RefNannyDeclarations
8502  PyObject *__pyx_t_1 = NULL;
8503  __Pyx_RefNannySetupContext("__get__", 0);
8504  __Pyx_XDECREF(__pyx_r);
8505  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->py); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 59, __pyx_L1_error)
8506  __Pyx_GOTREF(__pyx_t_1);
8507  __pyx_r = __pyx_t_1;
8508  __pyx_t_1 = 0;
8509  goto __pyx_L0;
8510 
8511  /* function exit code */
8512  __pyx_L1_error:;
8513  __Pyx_XDECREF(__pyx_t_1);
8514  __Pyx_AddTraceback("cmeshTools.CMesh.py.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8515  __pyx_r = NULL;
8516  __pyx_L0:;
8517  __Pyx_XGIVEREF(__pyx_r);
8518  __Pyx_RefNannyFinishContext();
8519  return __pyx_r;
8520 }
8521 
8522 /* Python wrapper */
8523 static int __pyx_pw_10cmeshTools_5CMesh_2py_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8524 static int __pyx_pw_10cmeshTools_5CMesh_2py_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8525  int __pyx_r;
8526  __Pyx_RefNannyDeclarations
8527  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8528  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2py_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8529 
8530  /* function exit code */
8531  __Pyx_RefNannyFinishContext();
8532  return __pyx_r;
8533 }
8534 
8535 static int __pyx_pf_10cmeshTools_5CMesh_2py_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8536  int __pyx_r;
8537  __Pyx_RefNannyDeclarations
8538  int __pyx_t_1;
8539  __Pyx_RefNannySetupContext("__set__", 0);
8540  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 59, __pyx_L1_error)
8541  __pyx_v_self->py = __pyx_t_1;
8542 
8543  /* function exit code */
8544  __pyx_r = 0;
8545  goto __pyx_L0;
8546  __pyx_L1_error:;
8547  __Pyx_AddTraceback("cmeshTools.CMesh.py.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8548  __pyx_r = -1;
8549  __pyx_L0:;
8550  __Pyx_RefNannyFinishContext();
8551  return __pyx_r;
8552 }
8553 
8554 /* "cmeshTools.pxd":60
8555  * cdef int px
8556  * cdef int py
8557  * cdef int pz, #NURBS # <<<<<<<<<<<<<<
8558  * # cdef int[:] elementIJK, #NURBS
8559  * # cdef double[:] weights, #NURBS
8560  */
8561 
8562 /* Python wrapper */
8563 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2pz_1__get__(PyObject *__pyx_v_self); /*proto*/
8564 static PyObject *__pyx_pw_10cmeshTools_5CMesh_2pz_1__get__(PyObject *__pyx_v_self) {
8565  PyObject *__pyx_r = 0;
8566  __Pyx_RefNannyDeclarations
8567  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8568  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2pz___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8569 
8570  /* function exit code */
8571  __Pyx_RefNannyFinishContext();
8572  return __pyx_r;
8573 }
8574 
8575 static PyObject *__pyx_pf_10cmeshTools_5CMesh_2pz___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8576  PyObject *__pyx_r = NULL;
8577  __Pyx_RefNannyDeclarations
8578  PyObject *__pyx_t_1 = NULL;
8579  __Pyx_RefNannySetupContext("__get__", 0);
8580  __Pyx_XDECREF(__pyx_r);
8581  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->pz); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 60, __pyx_L1_error)
8582  __Pyx_GOTREF(__pyx_t_1);
8583  __pyx_r = __pyx_t_1;
8584  __pyx_t_1 = 0;
8585  goto __pyx_L0;
8586 
8587  /* function exit code */
8588  __pyx_L1_error:;
8589  __Pyx_XDECREF(__pyx_t_1);
8590  __Pyx_AddTraceback("cmeshTools.CMesh.pz.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8591  __pyx_r = NULL;
8592  __pyx_L0:;
8593  __Pyx_XGIVEREF(__pyx_r);
8594  __Pyx_RefNannyFinishContext();
8595  return __pyx_r;
8596 }
8597 
8598 /* Python wrapper */
8599 static int __pyx_pw_10cmeshTools_5CMesh_2pz_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8600 static int __pyx_pw_10cmeshTools_5CMesh_2pz_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8601  int __pyx_r;
8602  __Pyx_RefNannyDeclarations
8603  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8604  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_2pz_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8605 
8606  /* function exit code */
8607  __Pyx_RefNannyFinishContext();
8608  return __pyx_r;
8609 }
8610 
8611 static int __pyx_pf_10cmeshTools_5CMesh_2pz_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8612  int __pyx_r;
8613  __Pyx_RefNannyDeclarations
8614  int __pyx_t_1;
8615  __Pyx_RefNannySetupContext("__set__", 0);
8616  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 60, __pyx_L1_error)
8617  __pyx_v_self->pz = __pyx_t_1;
8618 
8619  /* function exit code */
8620  __pyx_r = 0;
8621  goto __pyx_L0;
8622  __pyx_L1_error:;
8623  __Pyx_AddTraceback("cmeshTools.CMesh.pz.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8624  __pyx_r = -1;
8625  __pyx_L0:;
8626  __Pyx_RefNannyFinishContext();
8627  return __pyx_r;
8628 }
8629 
8630 /* "cmeshTools.pxd":74
8631  * # cdef double[:] nodeSupportArray,
8632  *
8633  * cdef np.ndarray elementIJK, #NURBS # <<<<<<<<<<<<<<
8634  * cdef np.ndarray weights, #NURBS
8635  * cdef np.ndarray U_KNOT, #NURBS
8636  */
8637 
8638 /* Python wrapper */
8639 static PyObject *__pyx_pw_10cmeshTools_5CMesh_10elementIJK_1__get__(PyObject *__pyx_v_self); /*proto*/
8640 static PyObject *__pyx_pw_10cmeshTools_5CMesh_10elementIJK_1__get__(PyObject *__pyx_v_self) {
8641  PyObject *__pyx_r = 0;
8642  __Pyx_RefNannyDeclarations
8643  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8644  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_10elementIJK___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8645 
8646  /* function exit code */
8647  __Pyx_RefNannyFinishContext();
8648  return __pyx_r;
8649 }
8650 
8651 static PyObject *__pyx_pf_10cmeshTools_5CMesh_10elementIJK___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8652  PyObject *__pyx_r = NULL;
8653  __Pyx_RefNannyDeclarations
8654  __Pyx_RefNannySetupContext("__get__", 0);
8655  __Pyx_XDECREF(__pyx_r);
8656  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementIJK));
8657  __pyx_r = ((PyObject *)__pyx_v_self->elementIJK);
8658  goto __pyx_L0;
8659 
8660  /* function exit code */
8661  __pyx_L0:;
8662  __Pyx_XGIVEREF(__pyx_r);
8663  __Pyx_RefNannyFinishContext();
8664  return __pyx_r;
8665 }
8666 
8667 /* Python wrapper */
8668 static int __pyx_pw_10cmeshTools_5CMesh_10elementIJK_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8669 static int __pyx_pw_10cmeshTools_5CMesh_10elementIJK_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8670  int __pyx_r;
8671  __Pyx_RefNannyDeclarations
8672  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8673  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_10elementIJK_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8674 
8675  /* function exit code */
8676  __Pyx_RefNannyFinishContext();
8677  return __pyx_r;
8678 }
8679 
8680 static int __pyx_pf_10cmeshTools_5CMesh_10elementIJK_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8681  int __pyx_r;
8682  __Pyx_RefNannyDeclarations
8683  PyObject *__pyx_t_1 = NULL;
8684  __Pyx_RefNannySetupContext("__set__", 0);
8685  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 74, __pyx_L1_error)
8686  __pyx_t_1 = __pyx_v_value;
8687  __Pyx_INCREF(__pyx_t_1);
8688  __Pyx_GIVEREF(__pyx_t_1);
8689  __Pyx_GOTREF(__pyx_v_self->elementIJK);
8690  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementIJK));
8691  __pyx_v_self->elementIJK = ((PyArrayObject *)__pyx_t_1);
8692  __pyx_t_1 = 0;
8693 
8694  /* function exit code */
8695  __pyx_r = 0;
8696  goto __pyx_L0;
8697  __pyx_L1_error:;
8698  __Pyx_XDECREF(__pyx_t_1);
8699  __Pyx_AddTraceback("cmeshTools.CMesh.elementIJK.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8700  __pyx_r = -1;
8701  __pyx_L0:;
8702  __Pyx_RefNannyFinishContext();
8703  return __pyx_r;
8704 }
8705 
8706 /* Python wrapper */
8707 static int __pyx_pw_10cmeshTools_5CMesh_10elementIJK_5__del__(PyObject *__pyx_v_self); /*proto*/
8708 static int __pyx_pw_10cmeshTools_5CMesh_10elementIJK_5__del__(PyObject *__pyx_v_self) {
8709  int __pyx_r;
8710  __Pyx_RefNannyDeclarations
8711  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
8712  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_10elementIJK_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8713 
8714  /* function exit code */
8715  __Pyx_RefNannyFinishContext();
8716  return __pyx_r;
8717 }
8718 
8719 static int __pyx_pf_10cmeshTools_5CMesh_10elementIJK_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8720  int __pyx_r;
8721  __Pyx_RefNannyDeclarations
8722  __Pyx_RefNannySetupContext("__del__", 0);
8723  __Pyx_INCREF(Py_None);
8724  __Pyx_GIVEREF(Py_None);
8725  __Pyx_GOTREF(__pyx_v_self->elementIJK);
8726  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementIJK));
8727  __pyx_v_self->elementIJK = ((PyArrayObject *)Py_None);
8728 
8729  /* function exit code */
8730  __pyx_r = 0;
8731  __Pyx_RefNannyFinishContext();
8732  return __pyx_r;
8733 }
8734 
8735 /* "cmeshTools.pxd":75
8736  *
8737  * cdef np.ndarray elementIJK, #NURBS
8738  * cdef np.ndarray weights, #NURBS # <<<<<<<<<<<<<<
8739  * cdef np.ndarray U_KNOT, #NURBS
8740  * cdef np.ndarray V_KNOT, #NURBS
8741  */
8742 
8743 /* Python wrapper */
8744 static PyObject *__pyx_pw_10cmeshTools_5CMesh_7weights_1__get__(PyObject *__pyx_v_self); /*proto*/
8745 static PyObject *__pyx_pw_10cmeshTools_5CMesh_7weights_1__get__(PyObject *__pyx_v_self) {
8746  PyObject *__pyx_r = 0;
8747  __Pyx_RefNannyDeclarations
8748  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8749  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_7weights___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8750 
8751  /* function exit code */
8752  __Pyx_RefNannyFinishContext();
8753  return __pyx_r;
8754 }
8755 
8756 static PyObject *__pyx_pf_10cmeshTools_5CMesh_7weights___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8757  PyObject *__pyx_r = NULL;
8758  __Pyx_RefNannyDeclarations
8759  __Pyx_RefNannySetupContext("__get__", 0);
8760  __Pyx_XDECREF(__pyx_r);
8761  __Pyx_INCREF(((PyObject *)__pyx_v_self->weights));
8762  __pyx_r = ((PyObject *)__pyx_v_self->weights);
8763  goto __pyx_L0;
8764 
8765  /* function exit code */
8766  __pyx_L0:;
8767  __Pyx_XGIVEREF(__pyx_r);
8768  __Pyx_RefNannyFinishContext();
8769  return __pyx_r;
8770 }
8771 
8772 /* Python wrapper */
8773 static int __pyx_pw_10cmeshTools_5CMesh_7weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8774 static int __pyx_pw_10cmeshTools_5CMesh_7weights_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8775  int __pyx_r;
8776  __Pyx_RefNannyDeclarations
8777  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8778  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_7weights_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8779 
8780  /* function exit code */
8781  __Pyx_RefNannyFinishContext();
8782  return __pyx_r;
8783 }
8784 
8785 static int __pyx_pf_10cmeshTools_5CMesh_7weights_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8786  int __pyx_r;
8787  __Pyx_RefNannyDeclarations
8788  PyObject *__pyx_t_1 = NULL;
8789  __Pyx_RefNannySetupContext("__set__", 0);
8790  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 75, __pyx_L1_error)
8791  __pyx_t_1 = __pyx_v_value;
8792  __Pyx_INCREF(__pyx_t_1);
8793  __Pyx_GIVEREF(__pyx_t_1);
8794  __Pyx_GOTREF(__pyx_v_self->weights);
8795  __Pyx_DECREF(((PyObject *)__pyx_v_self->weights));
8796  __pyx_v_self->weights = ((PyArrayObject *)__pyx_t_1);
8797  __pyx_t_1 = 0;
8798 
8799  /* function exit code */
8800  __pyx_r = 0;
8801  goto __pyx_L0;
8802  __pyx_L1_error:;
8803  __Pyx_XDECREF(__pyx_t_1);
8804  __Pyx_AddTraceback("cmeshTools.CMesh.weights.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8805  __pyx_r = -1;
8806  __pyx_L0:;
8807  __Pyx_RefNannyFinishContext();
8808  return __pyx_r;
8809 }
8810 
8811 /* Python wrapper */
8812 static int __pyx_pw_10cmeshTools_5CMesh_7weights_5__del__(PyObject *__pyx_v_self); /*proto*/
8813 static int __pyx_pw_10cmeshTools_5CMesh_7weights_5__del__(PyObject *__pyx_v_self) {
8814  int __pyx_r;
8815  __Pyx_RefNannyDeclarations
8816  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
8817  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_7weights_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8818 
8819  /* function exit code */
8820  __Pyx_RefNannyFinishContext();
8821  return __pyx_r;
8822 }
8823 
8824 static int __pyx_pf_10cmeshTools_5CMesh_7weights_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8825  int __pyx_r;
8826  __Pyx_RefNannyDeclarations
8827  __Pyx_RefNannySetupContext("__del__", 0);
8828  __Pyx_INCREF(Py_None);
8829  __Pyx_GIVEREF(Py_None);
8830  __Pyx_GOTREF(__pyx_v_self->weights);
8831  __Pyx_DECREF(((PyObject *)__pyx_v_self->weights));
8832  __pyx_v_self->weights = ((PyArrayObject *)Py_None);
8833 
8834  /* function exit code */
8835  __pyx_r = 0;
8836  __Pyx_RefNannyFinishContext();
8837  return __pyx_r;
8838 }
8839 
8840 /* "cmeshTools.pxd":76
8841  * cdef np.ndarray elementIJK, #NURBS
8842  * cdef np.ndarray weights, #NURBS
8843  * cdef np.ndarray U_KNOT, #NURBS # <<<<<<<<<<<<<<
8844  * cdef np.ndarray V_KNOT, #NURBS
8845  * cdef np.ndarray W_KNOT, #NURBS
8846  */
8847 
8848 /* Python wrapper */
8849 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6U_KNOT_1__get__(PyObject *__pyx_v_self); /*proto*/
8850 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6U_KNOT_1__get__(PyObject *__pyx_v_self) {
8851  PyObject *__pyx_r = 0;
8852  __Pyx_RefNannyDeclarations
8853  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8854  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6U_KNOT___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8855 
8856  /* function exit code */
8857  __Pyx_RefNannyFinishContext();
8858  return __pyx_r;
8859 }
8860 
8861 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6U_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8862  PyObject *__pyx_r = NULL;
8863  __Pyx_RefNannyDeclarations
8864  __Pyx_RefNannySetupContext("__get__", 0);
8865  __Pyx_XDECREF(__pyx_r);
8866  __Pyx_INCREF(((PyObject *)__pyx_v_self->U_KNOT));
8867  __pyx_r = ((PyObject *)__pyx_v_self->U_KNOT);
8868  goto __pyx_L0;
8869 
8870  /* function exit code */
8871  __pyx_L0:;
8872  __Pyx_XGIVEREF(__pyx_r);
8873  __Pyx_RefNannyFinishContext();
8874  return __pyx_r;
8875 }
8876 
8877 /* Python wrapper */
8878 static int __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8879 static int __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8880  int __pyx_r;
8881  __Pyx_RefNannyDeclarations
8882  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8883  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8884 
8885  /* function exit code */
8886  __Pyx_RefNannyFinishContext();
8887  return __pyx_r;
8888 }
8889 
8890 static int __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8891  int __pyx_r;
8892  __Pyx_RefNannyDeclarations
8893  PyObject *__pyx_t_1 = NULL;
8894  __Pyx_RefNannySetupContext("__set__", 0);
8895  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 76, __pyx_L1_error)
8896  __pyx_t_1 = __pyx_v_value;
8897  __Pyx_INCREF(__pyx_t_1);
8898  __Pyx_GIVEREF(__pyx_t_1);
8899  __Pyx_GOTREF(__pyx_v_self->U_KNOT);
8900  __Pyx_DECREF(((PyObject *)__pyx_v_self->U_KNOT));
8901  __pyx_v_self->U_KNOT = ((PyArrayObject *)__pyx_t_1);
8902  __pyx_t_1 = 0;
8903 
8904  /* function exit code */
8905  __pyx_r = 0;
8906  goto __pyx_L0;
8907  __pyx_L1_error:;
8908  __Pyx_XDECREF(__pyx_t_1);
8909  __Pyx_AddTraceback("cmeshTools.CMesh.U_KNOT.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
8910  __pyx_r = -1;
8911  __pyx_L0:;
8912  __Pyx_RefNannyFinishContext();
8913  return __pyx_r;
8914 }
8915 
8916 /* Python wrapper */
8917 static int __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_5__del__(PyObject *__pyx_v_self); /*proto*/
8918 static int __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_5__del__(PyObject *__pyx_v_self) {
8919  int __pyx_r;
8920  __Pyx_RefNannyDeclarations
8921  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
8922  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8923 
8924  /* function exit code */
8925  __Pyx_RefNannyFinishContext();
8926  return __pyx_r;
8927 }
8928 
8929 static int __pyx_pf_10cmeshTools_5CMesh_6U_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8930  int __pyx_r;
8931  __Pyx_RefNannyDeclarations
8932  __Pyx_RefNannySetupContext("__del__", 0);
8933  __Pyx_INCREF(Py_None);
8934  __Pyx_GIVEREF(Py_None);
8935  __Pyx_GOTREF(__pyx_v_self->U_KNOT);
8936  __Pyx_DECREF(((PyObject *)__pyx_v_self->U_KNOT));
8937  __pyx_v_self->U_KNOT = ((PyArrayObject *)Py_None);
8938 
8939  /* function exit code */
8940  __pyx_r = 0;
8941  __Pyx_RefNannyFinishContext();
8942  return __pyx_r;
8943 }
8944 
8945 /* "cmeshTools.pxd":77
8946  * cdef np.ndarray weights, #NURBS
8947  * cdef np.ndarray U_KNOT, #NURBS
8948  * cdef np.ndarray V_KNOT, #NURBS # <<<<<<<<<<<<<<
8949  * cdef np.ndarray W_KNOT, #NURBS
8950  * cdef np.ndarray elementDiametersArray,
8951  */
8952 
8953 /* Python wrapper */
8954 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6V_KNOT_1__get__(PyObject *__pyx_v_self); /*proto*/
8955 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6V_KNOT_1__get__(PyObject *__pyx_v_self) {
8956  PyObject *__pyx_r = 0;
8957  __Pyx_RefNannyDeclarations
8958  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
8959  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6V_KNOT___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
8960 
8961  /* function exit code */
8962  __Pyx_RefNannyFinishContext();
8963  return __pyx_r;
8964 }
8965 
8966 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6V_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
8967  PyObject *__pyx_r = NULL;
8968  __Pyx_RefNannyDeclarations
8969  __Pyx_RefNannySetupContext("__get__", 0);
8970  __Pyx_XDECREF(__pyx_r);
8971  __Pyx_INCREF(((PyObject *)__pyx_v_self->V_KNOT));
8972  __pyx_r = ((PyObject *)__pyx_v_self->V_KNOT);
8973  goto __pyx_L0;
8974 
8975  /* function exit code */
8976  __pyx_L0:;
8977  __Pyx_XGIVEREF(__pyx_r);
8978  __Pyx_RefNannyFinishContext();
8979  return __pyx_r;
8980 }
8981 
8982 /* Python wrapper */
8983 static int __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
8984 static int __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
8985  int __pyx_r;
8986  __Pyx_RefNannyDeclarations
8987  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
8988  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
8989 
8990  /* function exit code */
8991  __Pyx_RefNannyFinishContext();
8992  return __pyx_r;
8993 }
8994 
8995 static int __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
8996  int __pyx_r;
8997  __Pyx_RefNannyDeclarations
8998  PyObject *__pyx_t_1 = NULL;
8999  __Pyx_RefNannySetupContext("__set__", 0);
9000  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 77, __pyx_L1_error)
9001  __pyx_t_1 = __pyx_v_value;
9002  __Pyx_INCREF(__pyx_t_1);
9003  __Pyx_GIVEREF(__pyx_t_1);
9004  __Pyx_GOTREF(__pyx_v_self->V_KNOT);
9005  __Pyx_DECREF(((PyObject *)__pyx_v_self->V_KNOT));
9006  __pyx_v_self->V_KNOT = ((PyArrayObject *)__pyx_t_1);
9007  __pyx_t_1 = 0;
9008 
9009  /* function exit code */
9010  __pyx_r = 0;
9011  goto __pyx_L0;
9012  __pyx_L1_error:;
9013  __Pyx_XDECREF(__pyx_t_1);
9014  __Pyx_AddTraceback("cmeshTools.CMesh.V_KNOT.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9015  __pyx_r = -1;
9016  __pyx_L0:;
9017  __Pyx_RefNannyFinishContext();
9018  return __pyx_r;
9019 }
9020 
9021 /* Python wrapper */
9022 static int __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_5__del__(PyObject *__pyx_v_self); /*proto*/
9023 static int __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_5__del__(PyObject *__pyx_v_self) {
9024  int __pyx_r;
9025  __Pyx_RefNannyDeclarations
9026  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9027  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9028 
9029  /* function exit code */
9030  __Pyx_RefNannyFinishContext();
9031  return __pyx_r;
9032 }
9033 
9034 static int __pyx_pf_10cmeshTools_5CMesh_6V_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9035  int __pyx_r;
9036  __Pyx_RefNannyDeclarations
9037  __Pyx_RefNannySetupContext("__del__", 0);
9038  __Pyx_INCREF(Py_None);
9039  __Pyx_GIVEREF(Py_None);
9040  __Pyx_GOTREF(__pyx_v_self->V_KNOT);
9041  __Pyx_DECREF(((PyObject *)__pyx_v_self->V_KNOT));
9042  __pyx_v_self->V_KNOT = ((PyArrayObject *)Py_None);
9043 
9044  /* function exit code */
9045  __pyx_r = 0;
9046  __Pyx_RefNannyFinishContext();
9047  return __pyx_r;
9048 }
9049 
9050 /* "cmeshTools.pxd":78
9051  * cdef np.ndarray U_KNOT, #NURBS
9052  * cdef np.ndarray V_KNOT, #NURBS
9053  * cdef np.ndarray W_KNOT, #NURBS # <<<<<<<<<<<<<<
9054  * cdef np.ndarray elementDiametersArray,
9055  * cdef np.ndarray elementInnerDiametersArray,
9056  */
9057 
9058 /* Python wrapper */
9059 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6W_KNOT_1__get__(PyObject *__pyx_v_self); /*proto*/
9060 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6W_KNOT_1__get__(PyObject *__pyx_v_self) {
9061  PyObject *__pyx_r = 0;
9062  __Pyx_RefNannyDeclarations
9063  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9064  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6W_KNOT___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9065 
9066  /* function exit code */
9067  __Pyx_RefNannyFinishContext();
9068  return __pyx_r;
9069 }
9070 
9071 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6W_KNOT___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9072  PyObject *__pyx_r = NULL;
9073  __Pyx_RefNannyDeclarations
9074  __Pyx_RefNannySetupContext("__get__", 0);
9075  __Pyx_XDECREF(__pyx_r);
9076  __Pyx_INCREF(((PyObject *)__pyx_v_self->W_KNOT));
9077  __pyx_r = ((PyObject *)__pyx_v_self->W_KNOT);
9078  goto __pyx_L0;
9079 
9080  /* function exit code */
9081  __pyx_L0:;
9082  __Pyx_XGIVEREF(__pyx_r);
9083  __Pyx_RefNannyFinishContext();
9084  return __pyx_r;
9085 }
9086 
9087 /* Python wrapper */
9088 static int __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9089 static int __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9090  int __pyx_r;
9091  __Pyx_RefNannyDeclarations
9092  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9093  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9094 
9095  /* function exit code */
9096  __Pyx_RefNannyFinishContext();
9097  return __pyx_r;
9098 }
9099 
9100 static int __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9101  int __pyx_r;
9102  __Pyx_RefNannyDeclarations
9103  PyObject *__pyx_t_1 = NULL;
9104  __Pyx_RefNannySetupContext("__set__", 0);
9105  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 78, __pyx_L1_error)
9106  __pyx_t_1 = __pyx_v_value;
9107  __Pyx_INCREF(__pyx_t_1);
9108  __Pyx_GIVEREF(__pyx_t_1);
9109  __Pyx_GOTREF(__pyx_v_self->W_KNOT);
9110  __Pyx_DECREF(((PyObject *)__pyx_v_self->W_KNOT));
9111  __pyx_v_self->W_KNOT = ((PyArrayObject *)__pyx_t_1);
9112  __pyx_t_1 = 0;
9113 
9114  /* function exit code */
9115  __pyx_r = 0;
9116  goto __pyx_L0;
9117  __pyx_L1_error:;
9118  __Pyx_XDECREF(__pyx_t_1);
9119  __Pyx_AddTraceback("cmeshTools.CMesh.W_KNOT.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9120  __pyx_r = -1;
9121  __pyx_L0:;
9122  __Pyx_RefNannyFinishContext();
9123  return __pyx_r;
9124 }
9125 
9126 /* Python wrapper */
9127 static int __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_5__del__(PyObject *__pyx_v_self); /*proto*/
9128 static int __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_5__del__(PyObject *__pyx_v_self) {
9129  int __pyx_r;
9130  __Pyx_RefNannyDeclarations
9131  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9132  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9133 
9134  /* function exit code */
9135  __Pyx_RefNannyFinishContext();
9136  return __pyx_r;
9137 }
9138 
9139 static int __pyx_pf_10cmeshTools_5CMesh_6W_KNOT_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9140  int __pyx_r;
9141  __Pyx_RefNannyDeclarations
9142  __Pyx_RefNannySetupContext("__del__", 0);
9143  __Pyx_INCREF(Py_None);
9144  __Pyx_GIVEREF(Py_None);
9145  __Pyx_GOTREF(__pyx_v_self->W_KNOT);
9146  __Pyx_DECREF(((PyObject *)__pyx_v_self->W_KNOT));
9147  __pyx_v_self->W_KNOT = ((PyArrayObject *)Py_None);
9148 
9149  /* function exit code */
9150  __pyx_r = 0;
9151  __Pyx_RefNannyFinishContext();
9152  return __pyx_r;
9153 }
9154 
9155 /* "cmeshTools.pxd":79
9156  * cdef np.ndarray V_KNOT, #NURBS
9157  * cdef np.ndarray W_KNOT, #NURBS
9158  * cdef np.ndarray elementDiametersArray, # <<<<<<<<<<<<<<
9159  * cdef np.ndarray elementInnerDiametersArray,
9160  * cdef np.ndarray elementBoundaryDiametersArray,
9161  */
9162 
9163 /* Python wrapper */
9164 static PyObject *__pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9165 static PyObject *__pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_1__get__(PyObject *__pyx_v_self) {
9166  PyObject *__pyx_r = 0;
9167  __Pyx_RefNannyDeclarations
9168  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9169  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9170 
9171  /* function exit code */
9172  __Pyx_RefNannyFinishContext();
9173  return __pyx_r;
9174 }
9175 
9176 static PyObject *__pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9177  PyObject *__pyx_r = NULL;
9178  __Pyx_RefNannyDeclarations
9179  __Pyx_RefNannySetupContext("__get__", 0);
9180  __Pyx_XDECREF(__pyx_r);
9181  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementDiametersArray));
9182  __pyx_r = ((PyObject *)__pyx_v_self->elementDiametersArray);
9183  goto __pyx_L0;
9184 
9185  /* function exit code */
9186  __pyx_L0:;
9187  __Pyx_XGIVEREF(__pyx_r);
9188  __Pyx_RefNannyFinishContext();
9189  return __pyx_r;
9190 }
9191 
9192 /* Python wrapper */
9193 static int __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9194 static int __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9195  int __pyx_r;
9196  __Pyx_RefNannyDeclarations
9197  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9198  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9199 
9200  /* function exit code */
9201  __Pyx_RefNannyFinishContext();
9202  return __pyx_r;
9203 }
9204 
9205 static int __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9206  int __pyx_r;
9207  __Pyx_RefNannyDeclarations
9208  PyObject *__pyx_t_1 = NULL;
9209  __Pyx_RefNannySetupContext("__set__", 0);
9210  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 79, __pyx_L1_error)
9211  __pyx_t_1 = __pyx_v_value;
9212  __Pyx_INCREF(__pyx_t_1);
9213  __Pyx_GIVEREF(__pyx_t_1);
9214  __Pyx_GOTREF(__pyx_v_self->elementDiametersArray);
9215  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementDiametersArray));
9216  __pyx_v_self->elementDiametersArray = ((PyArrayObject *)__pyx_t_1);
9217  __pyx_t_1 = 0;
9218 
9219  /* function exit code */
9220  __pyx_r = 0;
9221  goto __pyx_L0;
9222  __pyx_L1_error:;
9223  __Pyx_XDECREF(__pyx_t_1);
9224  __Pyx_AddTraceback("cmeshTools.CMesh.elementDiametersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9225  __pyx_r = -1;
9226  __pyx_L0:;
9227  __Pyx_RefNannyFinishContext();
9228  return __pyx_r;
9229 }
9230 
9231 /* Python wrapper */
9232 static int __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9233 static int __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_5__del__(PyObject *__pyx_v_self) {
9234  int __pyx_r;
9235  __Pyx_RefNannyDeclarations
9236  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9237  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9238 
9239  /* function exit code */
9240  __Pyx_RefNannyFinishContext();
9241  return __pyx_r;
9242 }
9243 
9244 static int __pyx_pf_10cmeshTools_5CMesh_21elementDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9245  int __pyx_r;
9246  __Pyx_RefNannyDeclarations
9247  __Pyx_RefNannySetupContext("__del__", 0);
9248  __Pyx_INCREF(Py_None);
9249  __Pyx_GIVEREF(Py_None);
9250  __Pyx_GOTREF(__pyx_v_self->elementDiametersArray);
9251  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementDiametersArray));
9252  __pyx_v_self->elementDiametersArray = ((PyArrayObject *)Py_None);
9253 
9254  /* function exit code */
9255  __pyx_r = 0;
9256  __Pyx_RefNannyFinishContext();
9257  return __pyx_r;
9258 }
9259 
9260 /* "cmeshTools.pxd":80
9261  * cdef np.ndarray W_KNOT, #NURBS
9262  * cdef np.ndarray elementDiametersArray,
9263  * cdef np.ndarray elementInnerDiametersArray, # <<<<<<<<<<<<<<
9264  * cdef np.ndarray elementBoundaryDiametersArray,
9265  * cdef np.ndarray elementBarycentersArray,
9266  */
9267 
9268 /* Python wrapper */
9269 static PyObject *__pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9270 static PyObject *__pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_1__get__(PyObject *__pyx_v_self) {
9271  PyObject *__pyx_r = 0;
9272  __Pyx_RefNannyDeclarations
9273  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9274  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9275 
9276  /* function exit code */
9277  __Pyx_RefNannyFinishContext();
9278  return __pyx_r;
9279 }
9280 
9281 static PyObject *__pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9282  PyObject *__pyx_r = NULL;
9283  __Pyx_RefNannyDeclarations
9284  __Pyx_RefNannySetupContext("__get__", 0);
9285  __Pyx_XDECREF(__pyx_r);
9286  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementInnerDiametersArray));
9287  __pyx_r = ((PyObject *)__pyx_v_self->elementInnerDiametersArray);
9288  goto __pyx_L0;
9289 
9290  /* function exit code */
9291  __pyx_L0:;
9292  __Pyx_XGIVEREF(__pyx_r);
9293  __Pyx_RefNannyFinishContext();
9294  return __pyx_r;
9295 }
9296 
9297 /* Python wrapper */
9298 static int __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9299 static int __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9300  int __pyx_r;
9301  __Pyx_RefNannyDeclarations
9302  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9303  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9304 
9305  /* function exit code */
9306  __Pyx_RefNannyFinishContext();
9307  return __pyx_r;
9308 }
9309 
9310 static int __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9311  int __pyx_r;
9312  __Pyx_RefNannyDeclarations
9313  PyObject *__pyx_t_1 = NULL;
9314  __Pyx_RefNannySetupContext("__set__", 0);
9315  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 80, __pyx_L1_error)
9316  __pyx_t_1 = __pyx_v_value;
9317  __Pyx_INCREF(__pyx_t_1);
9318  __Pyx_GIVEREF(__pyx_t_1);
9319  __Pyx_GOTREF(__pyx_v_self->elementInnerDiametersArray);
9320  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementInnerDiametersArray));
9321  __pyx_v_self->elementInnerDiametersArray = ((PyArrayObject *)__pyx_t_1);
9322  __pyx_t_1 = 0;
9323 
9324  /* function exit code */
9325  __pyx_r = 0;
9326  goto __pyx_L0;
9327  __pyx_L1_error:;
9328  __Pyx_XDECREF(__pyx_t_1);
9329  __Pyx_AddTraceback("cmeshTools.CMesh.elementInnerDiametersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9330  __pyx_r = -1;
9331  __pyx_L0:;
9332  __Pyx_RefNannyFinishContext();
9333  return __pyx_r;
9334 }
9335 
9336 /* Python wrapper */
9337 static int __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9338 static int __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_5__del__(PyObject *__pyx_v_self) {
9339  int __pyx_r;
9340  __Pyx_RefNannyDeclarations
9341  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9342  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9343 
9344  /* function exit code */
9345  __Pyx_RefNannyFinishContext();
9346  return __pyx_r;
9347 }
9348 
9349 static int __pyx_pf_10cmeshTools_5CMesh_26elementInnerDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9350  int __pyx_r;
9351  __Pyx_RefNannyDeclarations
9352  __Pyx_RefNannySetupContext("__del__", 0);
9353  __Pyx_INCREF(Py_None);
9354  __Pyx_GIVEREF(Py_None);
9355  __Pyx_GOTREF(__pyx_v_self->elementInnerDiametersArray);
9356  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementInnerDiametersArray));
9357  __pyx_v_self->elementInnerDiametersArray = ((PyArrayObject *)Py_None);
9358 
9359  /* function exit code */
9360  __pyx_r = 0;
9361  __Pyx_RefNannyFinishContext();
9362  return __pyx_r;
9363 }
9364 
9365 /* "cmeshTools.pxd":81
9366  * cdef np.ndarray elementDiametersArray,
9367  * cdef np.ndarray elementInnerDiametersArray,
9368  * cdef np.ndarray elementBoundaryDiametersArray, # <<<<<<<<<<<<<<
9369  * cdef np.ndarray elementBarycentersArray,
9370  * cdef np.ndarray elementBoundaryBarycentersArray,
9371  */
9372 
9373 /* Python wrapper */
9374 static PyObject *__pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9375 static PyObject *__pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_1__get__(PyObject *__pyx_v_self) {
9376  PyObject *__pyx_r = 0;
9377  __Pyx_RefNannyDeclarations
9378  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9379  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9380 
9381  /* function exit code */
9382  __Pyx_RefNannyFinishContext();
9383  return __pyx_r;
9384 }
9385 
9386 static PyObject *__pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9387  PyObject *__pyx_r = NULL;
9388  __Pyx_RefNannyDeclarations
9389  __Pyx_RefNannySetupContext("__get__", 0);
9390  __Pyx_XDECREF(__pyx_r);
9391  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryDiametersArray));
9392  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryDiametersArray);
9393  goto __pyx_L0;
9394 
9395  /* function exit code */
9396  __pyx_L0:;
9397  __Pyx_XGIVEREF(__pyx_r);
9398  __Pyx_RefNannyFinishContext();
9399  return __pyx_r;
9400 }
9401 
9402 /* Python wrapper */
9403 static int __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9404 static int __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9405  int __pyx_r;
9406  __Pyx_RefNannyDeclarations
9407  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9408  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9409 
9410  /* function exit code */
9411  __Pyx_RefNannyFinishContext();
9412  return __pyx_r;
9413 }
9414 
9415 static int __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9416  int __pyx_r;
9417  __Pyx_RefNannyDeclarations
9418  PyObject *__pyx_t_1 = NULL;
9419  __Pyx_RefNannySetupContext("__set__", 0);
9420  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 81, __pyx_L1_error)
9421  __pyx_t_1 = __pyx_v_value;
9422  __Pyx_INCREF(__pyx_t_1);
9423  __Pyx_GIVEREF(__pyx_t_1);
9424  __Pyx_GOTREF(__pyx_v_self->elementBoundaryDiametersArray);
9425  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryDiametersArray));
9426  __pyx_v_self->elementBoundaryDiametersArray = ((PyArrayObject *)__pyx_t_1);
9427  __pyx_t_1 = 0;
9428 
9429  /* function exit code */
9430  __pyx_r = 0;
9431  goto __pyx_L0;
9432  __pyx_L1_error:;
9433  __Pyx_XDECREF(__pyx_t_1);
9434  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryDiametersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9435  __pyx_r = -1;
9436  __pyx_L0:;
9437  __Pyx_RefNannyFinishContext();
9438  return __pyx_r;
9439 }
9440 
9441 /* Python wrapper */
9442 static int __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9443 static int __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_5__del__(PyObject *__pyx_v_self) {
9444  int __pyx_r;
9445  __Pyx_RefNannyDeclarations
9446  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9447  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9448 
9449  /* function exit code */
9450  __Pyx_RefNannyFinishContext();
9451  return __pyx_r;
9452 }
9453 
9454 static int __pyx_pf_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9455  int __pyx_r;
9456  __Pyx_RefNannyDeclarations
9457  __Pyx_RefNannySetupContext("__del__", 0);
9458  __Pyx_INCREF(Py_None);
9459  __Pyx_GIVEREF(Py_None);
9460  __Pyx_GOTREF(__pyx_v_self->elementBoundaryDiametersArray);
9461  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryDiametersArray));
9462  __pyx_v_self->elementBoundaryDiametersArray = ((PyArrayObject *)Py_None);
9463 
9464  /* function exit code */
9465  __pyx_r = 0;
9466  __Pyx_RefNannyFinishContext();
9467  return __pyx_r;
9468 }
9469 
9470 /* "cmeshTools.pxd":82
9471  * cdef np.ndarray elementInnerDiametersArray,
9472  * cdef np.ndarray elementBoundaryDiametersArray,
9473  * cdef np.ndarray elementBarycentersArray, # <<<<<<<<<<<<<<
9474  * cdef np.ndarray elementBoundaryBarycentersArray,
9475  * cdef np.ndarray nodeDiametersArray,
9476  */
9477 
9478 /* Python wrapper */
9479 static PyObject *__pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9480 static PyObject *__pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_1__get__(PyObject *__pyx_v_self) {
9481  PyObject *__pyx_r = 0;
9482  __Pyx_RefNannyDeclarations
9483  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9484  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9485 
9486  /* function exit code */
9487  __Pyx_RefNannyFinishContext();
9488  return __pyx_r;
9489 }
9490 
9491 static PyObject *__pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9492  PyObject *__pyx_r = NULL;
9493  __Pyx_RefNannyDeclarations
9494  __Pyx_RefNannySetupContext("__get__", 0);
9495  __Pyx_XDECREF(__pyx_r);
9496  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBarycentersArray));
9497  __pyx_r = ((PyObject *)__pyx_v_self->elementBarycentersArray);
9498  goto __pyx_L0;
9499 
9500  /* function exit code */
9501  __pyx_L0:;
9502  __Pyx_XGIVEREF(__pyx_r);
9503  __Pyx_RefNannyFinishContext();
9504  return __pyx_r;
9505 }
9506 
9507 /* Python wrapper */
9508 static int __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9509 static int __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9510  int __pyx_r;
9511  __Pyx_RefNannyDeclarations
9512  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9513  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9514 
9515  /* function exit code */
9516  __Pyx_RefNannyFinishContext();
9517  return __pyx_r;
9518 }
9519 
9520 static int __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9521  int __pyx_r;
9522  __Pyx_RefNannyDeclarations
9523  PyObject *__pyx_t_1 = NULL;
9524  __Pyx_RefNannySetupContext("__set__", 0);
9525  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 82, __pyx_L1_error)
9526  __pyx_t_1 = __pyx_v_value;
9527  __Pyx_INCREF(__pyx_t_1);
9528  __Pyx_GIVEREF(__pyx_t_1);
9529  __Pyx_GOTREF(__pyx_v_self->elementBarycentersArray);
9530  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBarycentersArray));
9531  __pyx_v_self->elementBarycentersArray = ((PyArrayObject *)__pyx_t_1);
9532  __pyx_t_1 = 0;
9533 
9534  /* function exit code */
9535  __pyx_r = 0;
9536  goto __pyx_L0;
9537  __pyx_L1_error:;
9538  __Pyx_XDECREF(__pyx_t_1);
9539  __Pyx_AddTraceback("cmeshTools.CMesh.elementBarycentersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9540  __pyx_r = -1;
9541  __pyx_L0:;
9542  __Pyx_RefNannyFinishContext();
9543  return __pyx_r;
9544 }
9545 
9546 /* Python wrapper */
9547 static int __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9548 static int __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_5__del__(PyObject *__pyx_v_self) {
9549  int __pyx_r;
9550  __Pyx_RefNannyDeclarations
9551  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9552  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9553 
9554  /* function exit code */
9555  __Pyx_RefNannyFinishContext();
9556  return __pyx_r;
9557 }
9558 
9559 static int __pyx_pf_10cmeshTools_5CMesh_23elementBarycentersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9560  int __pyx_r;
9561  __Pyx_RefNannyDeclarations
9562  __Pyx_RefNannySetupContext("__del__", 0);
9563  __Pyx_INCREF(Py_None);
9564  __Pyx_GIVEREF(Py_None);
9565  __Pyx_GOTREF(__pyx_v_self->elementBarycentersArray);
9566  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBarycentersArray));
9567  __pyx_v_self->elementBarycentersArray = ((PyArrayObject *)Py_None);
9568 
9569  /* function exit code */
9570  __pyx_r = 0;
9571  __Pyx_RefNannyFinishContext();
9572  return __pyx_r;
9573 }
9574 
9575 /* "cmeshTools.pxd":83
9576  * cdef np.ndarray elementBoundaryDiametersArray,
9577  * cdef np.ndarray elementBarycentersArray,
9578  * cdef np.ndarray elementBoundaryBarycentersArray, # <<<<<<<<<<<<<<
9579  * cdef np.ndarray nodeDiametersArray,
9580  * cdef np.ndarray nodeSupportArray,
9581  */
9582 
9583 /* Python wrapper */
9584 static PyObject *__pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9585 static PyObject *__pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_1__get__(PyObject *__pyx_v_self) {
9586  PyObject *__pyx_r = 0;
9587  __Pyx_RefNannyDeclarations
9588  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9589  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9590 
9591  /* function exit code */
9592  __Pyx_RefNannyFinishContext();
9593  return __pyx_r;
9594 }
9595 
9596 static PyObject *__pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9597  PyObject *__pyx_r = NULL;
9598  __Pyx_RefNannyDeclarations
9599  __Pyx_RefNannySetupContext("__get__", 0);
9600  __Pyx_XDECREF(__pyx_r);
9601  __Pyx_INCREF(((PyObject *)__pyx_v_self->elementBoundaryBarycentersArray));
9602  __pyx_r = ((PyObject *)__pyx_v_self->elementBoundaryBarycentersArray);
9603  goto __pyx_L0;
9604 
9605  /* function exit code */
9606  __pyx_L0:;
9607  __Pyx_XGIVEREF(__pyx_r);
9608  __Pyx_RefNannyFinishContext();
9609  return __pyx_r;
9610 }
9611 
9612 /* Python wrapper */
9613 static int __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9614 static int __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9615  int __pyx_r;
9616  __Pyx_RefNannyDeclarations
9617  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9618  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9619 
9620  /* function exit code */
9621  __Pyx_RefNannyFinishContext();
9622  return __pyx_r;
9623 }
9624 
9625 static int __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9626  int __pyx_r;
9627  __Pyx_RefNannyDeclarations
9628  PyObject *__pyx_t_1 = NULL;
9629  __Pyx_RefNannySetupContext("__set__", 0);
9630  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 83, __pyx_L1_error)
9631  __pyx_t_1 = __pyx_v_value;
9632  __Pyx_INCREF(__pyx_t_1);
9633  __Pyx_GIVEREF(__pyx_t_1);
9634  __Pyx_GOTREF(__pyx_v_self->elementBoundaryBarycentersArray);
9635  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryBarycentersArray));
9636  __pyx_v_self->elementBoundaryBarycentersArray = ((PyArrayObject *)__pyx_t_1);
9637  __pyx_t_1 = 0;
9638 
9639  /* function exit code */
9640  __pyx_r = 0;
9641  goto __pyx_L0;
9642  __pyx_L1_error:;
9643  __Pyx_XDECREF(__pyx_t_1);
9644  __Pyx_AddTraceback("cmeshTools.CMesh.elementBoundaryBarycentersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9645  __pyx_r = -1;
9646  __pyx_L0:;
9647  __Pyx_RefNannyFinishContext();
9648  return __pyx_r;
9649 }
9650 
9651 /* Python wrapper */
9652 static int __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9653 static int __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_5__del__(PyObject *__pyx_v_self) {
9654  int __pyx_r;
9655  __Pyx_RefNannyDeclarations
9656  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9657  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9658 
9659  /* function exit code */
9660  __Pyx_RefNannyFinishContext();
9661  return __pyx_r;
9662 }
9663 
9664 static int __pyx_pf_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9665  int __pyx_r;
9666  __Pyx_RefNannyDeclarations
9667  __Pyx_RefNannySetupContext("__del__", 0);
9668  __Pyx_INCREF(Py_None);
9669  __Pyx_GIVEREF(Py_None);
9670  __Pyx_GOTREF(__pyx_v_self->elementBoundaryBarycentersArray);
9671  __Pyx_DECREF(((PyObject *)__pyx_v_self->elementBoundaryBarycentersArray));
9672  __pyx_v_self->elementBoundaryBarycentersArray = ((PyArrayObject *)Py_None);
9673 
9674  /* function exit code */
9675  __pyx_r = 0;
9676  __Pyx_RefNannyFinishContext();
9677  return __pyx_r;
9678 }
9679 
9680 /* "cmeshTools.pxd":84
9681  * cdef np.ndarray elementBarycentersArray,
9682  * cdef np.ndarray elementBoundaryBarycentersArray,
9683  * cdef np.ndarray nodeDiametersArray, # <<<<<<<<<<<<<<
9684  * cdef np.ndarray nodeSupportArray,
9685  *
9686  */
9687 
9688 /* Python wrapper */
9689 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9690 static PyObject *__pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_1__get__(PyObject *__pyx_v_self) {
9691  PyObject *__pyx_r = 0;
9692  __Pyx_RefNannyDeclarations
9693  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9694  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9695 
9696  /* function exit code */
9697  __Pyx_RefNannyFinishContext();
9698  return __pyx_r;
9699 }
9700 
9701 static PyObject *__pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9702  PyObject *__pyx_r = NULL;
9703  __Pyx_RefNannyDeclarations
9704  __Pyx_RefNannySetupContext("__get__", 0);
9705  __Pyx_XDECREF(__pyx_r);
9706  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeDiametersArray));
9707  __pyx_r = ((PyObject *)__pyx_v_self->nodeDiametersArray);
9708  goto __pyx_L0;
9709 
9710  /* function exit code */
9711  __pyx_L0:;
9712  __Pyx_XGIVEREF(__pyx_r);
9713  __Pyx_RefNannyFinishContext();
9714  return __pyx_r;
9715 }
9716 
9717 /* Python wrapper */
9718 static int __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9719 static int __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9720  int __pyx_r;
9721  __Pyx_RefNannyDeclarations
9722  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9723  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9724 
9725  /* function exit code */
9726  __Pyx_RefNannyFinishContext();
9727  return __pyx_r;
9728 }
9729 
9730 static int __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9731  int __pyx_r;
9732  __Pyx_RefNannyDeclarations
9733  PyObject *__pyx_t_1 = NULL;
9734  __Pyx_RefNannySetupContext("__set__", 0);
9735  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 84, __pyx_L1_error)
9736  __pyx_t_1 = __pyx_v_value;
9737  __Pyx_INCREF(__pyx_t_1);
9738  __Pyx_GIVEREF(__pyx_t_1);
9739  __Pyx_GOTREF(__pyx_v_self->nodeDiametersArray);
9740  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeDiametersArray));
9741  __pyx_v_self->nodeDiametersArray = ((PyArrayObject *)__pyx_t_1);
9742  __pyx_t_1 = 0;
9743 
9744  /* function exit code */
9745  __pyx_r = 0;
9746  goto __pyx_L0;
9747  __pyx_L1_error:;
9748  __Pyx_XDECREF(__pyx_t_1);
9749  __Pyx_AddTraceback("cmeshTools.CMesh.nodeDiametersArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9750  __pyx_r = -1;
9751  __pyx_L0:;
9752  __Pyx_RefNannyFinishContext();
9753  return __pyx_r;
9754 }
9755 
9756 /* Python wrapper */
9757 static int __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9758 static int __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_5__del__(PyObject *__pyx_v_self) {
9759  int __pyx_r;
9760  __Pyx_RefNannyDeclarations
9761  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9762  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9763 
9764  /* function exit code */
9765  __Pyx_RefNannyFinishContext();
9766  return __pyx_r;
9767 }
9768 
9769 static int __pyx_pf_10cmeshTools_5CMesh_18nodeDiametersArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9770  int __pyx_r;
9771  __Pyx_RefNannyDeclarations
9772  __Pyx_RefNannySetupContext("__del__", 0);
9773  __Pyx_INCREF(Py_None);
9774  __Pyx_GIVEREF(Py_None);
9775  __Pyx_GOTREF(__pyx_v_self->nodeDiametersArray);
9776  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeDiametersArray));
9777  __pyx_v_self->nodeDiametersArray = ((PyArrayObject *)Py_None);
9778 
9779  /* function exit code */
9780  __pyx_r = 0;
9781  __Pyx_RefNannyFinishContext();
9782  return __pyx_r;
9783 }
9784 
9785 /* "cmeshTools.pxd":85
9786  * cdef np.ndarray elementBoundaryBarycentersArray,
9787  * cdef np.ndarray nodeDiametersArray,
9788  * cdef np.ndarray nodeSupportArray, # <<<<<<<<<<<<<<
9789  *
9790  * cdef double h,
9791  */
9792 
9793 /* Python wrapper */
9794 static PyObject *__pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_1__get__(PyObject *__pyx_v_self); /*proto*/
9795 static PyObject *__pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_1__get__(PyObject *__pyx_v_self) {
9796  PyObject *__pyx_r = 0;
9797  __Pyx_RefNannyDeclarations
9798  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9799  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9800 
9801  /* function exit code */
9802  __Pyx_RefNannyFinishContext();
9803  return __pyx_r;
9804 }
9805 
9806 static PyObject *__pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9807  PyObject *__pyx_r = NULL;
9808  __Pyx_RefNannyDeclarations
9809  __Pyx_RefNannySetupContext("__get__", 0);
9810  __Pyx_XDECREF(__pyx_r);
9811  __Pyx_INCREF(((PyObject *)__pyx_v_self->nodeSupportArray));
9812  __pyx_r = ((PyObject *)__pyx_v_self->nodeSupportArray);
9813  goto __pyx_L0;
9814 
9815  /* function exit code */
9816  __pyx_L0:;
9817  __Pyx_XGIVEREF(__pyx_r);
9818  __Pyx_RefNannyFinishContext();
9819  return __pyx_r;
9820 }
9821 
9822 /* Python wrapper */
9823 static int __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9824 static int __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9825  int __pyx_r;
9826  __Pyx_RefNannyDeclarations
9827  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9828  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9829 
9830  /* function exit code */
9831  __Pyx_RefNannyFinishContext();
9832  return __pyx_r;
9833 }
9834 
9835 static int __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9836  int __pyx_r;
9837  __Pyx_RefNannyDeclarations
9838  PyObject *__pyx_t_1 = NULL;
9839  __Pyx_RefNannySetupContext("__set__", 0);
9840  if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(2, 85, __pyx_L1_error)
9841  __pyx_t_1 = __pyx_v_value;
9842  __Pyx_INCREF(__pyx_t_1);
9843  __Pyx_GIVEREF(__pyx_t_1);
9844  __Pyx_GOTREF(__pyx_v_self->nodeSupportArray);
9845  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeSupportArray));
9846  __pyx_v_self->nodeSupportArray = ((PyArrayObject *)__pyx_t_1);
9847  __pyx_t_1 = 0;
9848 
9849  /* function exit code */
9850  __pyx_r = 0;
9851  goto __pyx_L0;
9852  __pyx_L1_error:;
9853  __Pyx_XDECREF(__pyx_t_1);
9854  __Pyx_AddTraceback("cmeshTools.CMesh.nodeSupportArray.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9855  __pyx_r = -1;
9856  __pyx_L0:;
9857  __Pyx_RefNannyFinishContext();
9858  return __pyx_r;
9859 }
9860 
9861 /* Python wrapper */
9862 static int __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_5__del__(PyObject *__pyx_v_self); /*proto*/
9863 static int __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_5__del__(PyObject *__pyx_v_self) {
9864  int __pyx_r;
9865  __Pyx_RefNannyDeclarations
9866  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
9867  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_4__del__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9868 
9869  /* function exit code */
9870  __Pyx_RefNannyFinishContext();
9871  return __pyx_r;
9872 }
9873 
9874 static int __pyx_pf_10cmeshTools_5CMesh_16nodeSupportArray_4__del__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9875  int __pyx_r;
9876  __Pyx_RefNannyDeclarations
9877  __Pyx_RefNannySetupContext("__del__", 0);
9878  __Pyx_INCREF(Py_None);
9879  __Pyx_GIVEREF(Py_None);
9880  __Pyx_GOTREF(__pyx_v_self->nodeSupportArray);
9881  __Pyx_DECREF(((PyObject *)__pyx_v_self->nodeSupportArray));
9882  __pyx_v_self->nodeSupportArray = ((PyArrayObject *)Py_None);
9883 
9884  /* function exit code */
9885  __pyx_r = 0;
9886  __Pyx_RefNannyFinishContext();
9887  return __pyx_r;
9888 }
9889 
9890 /* "cmeshTools.pxd":87
9891  * cdef np.ndarray nodeSupportArray,
9892  *
9893  * cdef double h, # <<<<<<<<<<<<<<
9894  * cdef double hMin,
9895  * cdef double sigmaMax,
9896  */
9897 
9898 /* Python wrapper */
9899 static PyObject *__pyx_pw_10cmeshTools_5CMesh_1h_1__get__(PyObject *__pyx_v_self); /*proto*/
9900 static PyObject *__pyx_pw_10cmeshTools_5CMesh_1h_1__get__(PyObject *__pyx_v_self) {
9901  PyObject *__pyx_r = 0;
9902  __Pyx_RefNannyDeclarations
9903  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9904  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_1h___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9905 
9906  /* function exit code */
9907  __Pyx_RefNannyFinishContext();
9908  return __pyx_r;
9909 }
9910 
9911 static PyObject *__pyx_pf_10cmeshTools_5CMesh_1h___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9912  PyObject *__pyx_r = NULL;
9913  __Pyx_RefNannyDeclarations
9914  PyObject *__pyx_t_1 = NULL;
9915  __Pyx_RefNannySetupContext("__get__", 0);
9916  __Pyx_XDECREF(__pyx_r);
9917  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->h); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 87, __pyx_L1_error)
9918  __Pyx_GOTREF(__pyx_t_1);
9919  __pyx_r = __pyx_t_1;
9920  __pyx_t_1 = 0;
9921  goto __pyx_L0;
9922 
9923  /* function exit code */
9924  __pyx_L1_error:;
9925  __Pyx_XDECREF(__pyx_t_1);
9926  __Pyx_AddTraceback("cmeshTools.CMesh.h.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9927  __pyx_r = NULL;
9928  __pyx_L0:;
9929  __Pyx_XGIVEREF(__pyx_r);
9930  __Pyx_RefNannyFinishContext();
9931  return __pyx_r;
9932 }
9933 
9934 /* Python wrapper */
9935 static int __pyx_pw_10cmeshTools_5CMesh_1h_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
9936 static int __pyx_pw_10cmeshTools_5CMesh_1h_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
9937  int __pyx_r;
9938  __Pyx_RefNannyDeclarations
9939  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
9940  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_1h_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
9941 
9942  /* function exit code */
9943  __Pyx_RefNannyFinishContext();
9944  return __pyx_r;
9945 }
9946 
9947 static int __pyx_pf_10cmeshTools_5CMesh_1h_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
9948  int __pyx_r;
9949  __Pyx_RefNannyDeclarations
9950  double __pyx_t_1;
9951  __Pyx_RefNannySetupContext("__set__", 0);
9952  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 87, __pyx_L1_error)
9953  __pyx_v_self->h = __pyx_t_1;
9954 
9955  /* function exit code */
9956  __pyx_r = 0;
9957  goto __pyx_L0;
9958  __pyx_L1_error:;
9959  __Pyx_AddTraceback("cmeshTools.CMesh.h.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
9960  __pyx_r = -1;
9961  __pyx_L0:;
9962  __Pyx_RefNannyFinishContext();
9963  return __pyx_r;
9964 }
9965 
9966 /* "cmeshTools.pxd":88
9967  *
9968  * cdef double h,
9969  * cdef double hMin, # <<<<<<<<<<<<<<
9970  * cdef double sigmaMax,
9971  * cdef double volume
9972  */
9973 
9974 /* Python wrapper */
9975 static PyObject *__pyx_pw_10cmeshTools_5CMesh_4hMin_1__get__(PyObject *__pyx_v_self); /*proto*/
9976 static PyObject *__pyx_pw_10cmeshTools_5CMesh_4hMin_1__get__(PyObject *__pyx_v_self) {
9977  PyObject *__pyx_r = 0;
9978  __Pyx_RefNannyDeclarations
9979  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
9980  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_4hMin___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
9981 
9982  /* function exit code */
9983  __Pyx_RefNannyFinishContext();
9984  return __pyx_r;
9985 }
9986 
9987 static PyObject *__pyx_pf_10cmeshTools_5CMesh_4hMin___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
9988  PyObject *__pyx_r = NULL;
9989  __Pyx_RefNannyDeclarations
9990  PyObject *__pyx_t_1 = NULL;
9991  __Pyx_RefNannySetupContext("__get__", 0);
9992  __Pyx_XDECREF(__pyx_r);
9993  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->hMin); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 88, __pyx_L1_error)
9994  __Pyx_GOTREF(__pyx_t_1);
9995  __pyx_r = __pyx_t_1;
9996  __pyx_t_1 = 0;
9997  goto __pyx_L0;
9998 
9999  /* function exit code */
10000  __pyx_L1_error:;
10001  __Pyx_XDECREF(__pyx_t_1);
10002  __Pyx_AddTraceback("cmeshTools.CMesh.hMin.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10003  __pyx_r = NULL;
10004  __pyx_L0:;
10005  __Pyx_XGIVEREF(__pyx_r);
10006  __Pyx_RefNannyFinishContext();
10007  return __pyx_r;
10008 }
10009 
10010 /* Python wrapper */
10011 static int __pyx_pw_10cmeshTools_5CMesh_4hMin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
10012 static int __pyx_pw_10cmeshTools_5CMesh_4hMin_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
10013  int __pyx_r;
10014  __Pyx_RefNannyDeclarations
10015  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
10016  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_4hMin_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
10017 
10018  /* function exit code */
10019  __Pyx_RefNannyFinishContext();
10020  return __pyx_r;
10021 }
10022 
10023 static int __pyx_pf_10cmeshTools_5CMesh_4hMin_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
10024  int __pyx_r;
10025  __Pyx_RefNannyDeclarations
10026  double __pyx_t_1;
10027  __Pyx_RefNannySetupContext("__set__", 0);
10028  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 88, __pyx_L1_error)
10029  __pyx_v_self->hMin = __pyx_t_1;
10030 
10031  /* function exit code */
10032  __pyx_r = 0;
10033  goto __pyx_L0;
10034  __pyx_L1_error:;
10035  __Pyx_AddTraceback("cmeshTools.CMesh.hMin.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10036  __pyx_r = -1;
10037  __pyx_L0:;
10038  __Pyx_RefNannyFinishContext();
10039  return __pyx_r;
10040 }
10041 
10042 /* "cmeshTools.pxd":89
10043  * cdef double h,
10044  * cdef double hMin,
10045  * cdef double sigmaMax, # <<<<<<<<<<<<<<
10046  * cdef double volume
10047  */
10048 
10049 /* Python wrapper */
10050 static PyObject *__pyx_pw_10cmeshTools_5CMesh_8sigmaMax_1__get__(PyObject *__pyx_v_self); /*proto*/
10051 static PyObject *__pyx_pw_10cmeshTools_5CMesh_8sigmaMax_1__get__(PyObject *__pyx_v_self) {
10052  PyObject *__pyx_r = 0;
10053  __Pyx_RefNannyDeclarations
10054  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10055  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_8sigmaMax___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
10056 
10057  /* function exit code */
10058  __Pyx_RefNannyFinishContext();
10059  return __pyx_r;
10060 }
10061 
10062 static PyObject *__pyx_pf_10cmeshTools_5CMesh_8sigmaMax___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10063  PyObject *__pyx_r = NULL;
10064  __Pyx_RefNannyDeclarations
10065  PyObject *__pyx_t_1 = NULL;
10066  __Pyx_RefNannySetupContext("__get__", 0);
10067  __Pyx_XDECREF(__pyx_r);
10068  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->sigmaMax); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 89, __pyx_L1_error)
10069  __Pyx_GOTREF(__pyx_t_1);
10070  __pyx_r = __pyx_t_1;
10071  __pyx_t_1 = 0;
10072  goto __pyx_L0;
10073 
10074  /* function exit code */
10075  __pyx_L1_error:;
10076  __Pyx_XDECREF(__pyx_t_1);
10077  __Pyx_AddTraceback("cmeshTools.CMesh.sigmaMax.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10078  __pyx_r = NULL;
10079  __pyx_L0:;
10080  __Pyx_XGIVEREF(__pyx_r);
10081  __Pyx_RefNannyFinishContext();
10082  return __pyx_r;
10083 }
10084 
10085 /* Python wrapper */
10086 static int __pyx_pw_10cmeshTools_5CMesh_8sigmaMax_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
10087 static int __pyx_pw_10cmeshTools_5CMesh_8sigmaMax_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
10088  int __pyx_r;
10089  __Pyx_RefNannyDeclarations
10090  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
10091  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_8sigmaMax_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
10092 
10093  /* function exit code */
10094  __Pyx_RefNannyFinishContext();
10095  return __pyx_r;
10096 }
10097 
10098 static int __pyx_pf_10cmeshTools_5CMesh_8sigmaMax_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
10099  int __pyx_r;
10100  __Pyx_RefNannyDeclarations
10101  double __pyx_t_1;
10102  __Pyx_RefNannySetupContext("__set__", 0);
10103  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 89, __pyx_L1_error)
10104  __pyx_v_self->sigmaMax = __pyx_t_1;
10105 
10106  /* function exit code */
10107  __pyx_r = 0;
10108  goto __pyx_L0;
10109  __pyx_L1_error:;
10110  __Pyx_AddTraceback("cmeshTools.CMesh.sigmaMax.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10111  __pyx_r = -1;
10112  __pyx_L0:;
10113  __Pyx_RefNannyFinishContext();
10114  return __pyx_r;
10115 }
10116 
10117 /* "cmeshTools.pxd":90
10118  * cdef double hMin,
10119  * cdef double sigmaMax,
10120  * cdef double volume # <<<<<<<<<<<<<<
10121  */
10122 
10123 /* Python wrapper */
10124 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6volume_1__get__(PyObject *__pyx_v_self); /*proto*/
10125 static PyObject *__pyx_pw_10cmeshTools_5CMesh_6volume_1__get__(PyObject *__pyx_v_self) {
10126  PyObject *__pyx_r = 0;
10127  __Pyx_RefNannyDeclarations
10128  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
10129  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6volume___get__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
10130 
10131  /* function exit code */
10132  __Pyx_RefNannyFinishContext();
10133  return __pyx_r;
10134 }
10135 
10136 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6volume___get__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10137  PyObject *__pyx_r = NULL;
10138  __Pyx_RefNannyDeclarations
10139  PyObject *__pyx_t_1 = NULL;
10140  __Pyx_RefNannySetupContext("__get__", 0);
10141  __Pyx_XDECREF(__pyx_r);
10142  __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->volume); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 90, __pyx_L1_error)
10143  __Pyx_GOTREF(__pyx_t_1);
10144  __pyx_r = __pyx_t_1;
10145  __pyx_t_1 = 0;
10146  goto __pyx_L0;
10147 
10148  /* function exit code */
10149  __pyx_L1_error:;
10150  __Pyx_XDECREF(__pyx_t_1);
10151  __Pyx_AddTraceback("cmeshTools.CMesh.volume.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10152  __pyx_r = NULL;
10153  __pyx_L0:;
10154  __Pyx_XGIVEREF(__pyx_r);
10155  __Pyx_RefNannyFinishContext();
10156  return __pyx_r;
10157 }
10158 
10159 /* Python wrapper */
10160 static int __pyx_pw_10cmeshTools_5CMesh_6volume_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
10161 static int __pyx_pw_10cmeshTools_5CMesh_6volume_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
10162  int __pyx_r;
10163  __Pyx_RefNannyDeclarations
10164  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
10165  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6volume_2__set__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
10166 
10167  /* function exit code */
10168  __Pyx_RefNannyFinishContext();
10169  return __pyx_r;
10170 }
10171 
10172 static int __pyx_pf_10cmeshTools_5CMesh_6volume_2__set__(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, PyObject *__pyx_v_value) {
10173  int __pyx_r;
10174  __Pyx_RefNannyDeclarations
10175  double __pyx_t_1;
10176  __Pyx_RefNannySetupContext("__set__", 0);
10177  __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(2, 90, __pyx_L1_error)
10178  __pyx_v_self->volume = __pyx_t_1;
10179 
10180  /* function exit code */
10181  __pyx_r = 0;
10182  goto __pyx_L0;
10183  __pyx_L1_error:;
10184  __Pyx_AddTraceback("cmeshTools.CMesh.volume.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10185  __pyx_r = -1;
10186  __pyx_L0:;
10187  __Pyx_RefNannyFinishContext();
10188  return __pyx_r;
10189 }
10190 
10191 /* "(tree fragment)":1
10192  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10193  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10194  * def __setstate_cython__(self, __pyx_state):
10195  */
10196 
10197 /* Python wrapper */
10198 static PyObject *__pyx_pw_10cmeshTools_5CMesh_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
10199 static PyObject *__pyx_pw_10cmeshTools_5CMesh_7__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
10200  PyObject *__pyx_r = 0;
10201  __Pyx_RefNannyDeclarations
10202  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
10203  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_6__reduce_cython__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self));
10204 
10205  /* function exit code */
10206  __Pyx_RefNannyFinishContext();
10207  return __pyx_r;
10208 }
10209 
10210 static PyObject *__pyx_pf_10cmeshTools_5CMesh_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self) {
10211  PyObject *__pyx_r = NULL;
10212  __Pyx_RefNannyDeclarations
10213  PyObject *__pyx_t_1 = NULL;
10214  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
10215 
10216  /* "(tree fragment)":2
10217  * def __reduce_cython__(self):
10218  * raise TypeError("self.mesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
10219  * def __setstate_cython__(self, __pyx_state):
10220  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10221  */
10222  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
10223  __Pyx_GOTREF(__pyx_t_1);
10224  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10225  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10226  __PYX_ERR(0, 2, __pyx_L1_error)
10227 
10228  /* "(tree fragment)":1
10229  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
10230  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10231  * def __setstate_cython__(self, __pyx_state):
10232  */
10233 
10234  /* function exit code */
10235  __pyx_L1_error:;
10236  __Pyx_XDECREF(__pyx_t_1);
10237  __Pyx_AddTraceback("cmeshTools.CMesh.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10238  __pyx_r = NULL;
10239  __Pyx_XGIVEREF(__pyx_r);
10240  __Pyx_RefNannyFinishContext();
10241  return __pyx_r;
10242 }
10243 
10244 /* "(tree fragment)":3
10245  * def __reduce_cython__(self):
10246  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10247  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
10248  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10249  */
10250 
10251 /* Python wrapper */
10252 static PyObject *__pyx_pw_10cmeshTools_5CMesh_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
10253 static PyObject *__pyx_pw_10cmeshTools_5CMesh_9__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
10254  PyObject *__pyx_r = 0;
10255  __Pyx_RefNannyDeclarations
10256  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
10257  __pyx_r = __pyx_pf_10cmeshTools_5CMesh_8__setstate_cython__(((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
10258 
10259  /* function exit code */
10260  __Pyx_RefNannyFinishContext();
10261  return __pyx_r;
10262 }
10263 
10264 static PyObject *__pyx_pf_10cmeshTools_5CMesh_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
10265  PyObject *__pyx_r = NULL;
10266  __Pyx_RefNannyDeclarations
10267  PyObject *__pyx_t_1 = NULL;
10268  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
10269 
10270  /* "(tree fragment)":4
10271  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10272  * def __setstate_cython__(self, __pyx_state):
10273  * raise TypeError("self.mesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
10274  */
10275  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
10276  __Pyx_GOTREF(__pyx_t_1);
10277  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
10278  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10279  __PYX_ERR(0, 4, __pyx_L1_error)
10280 
10281  /* "(tree fragment)":3
10282  * def __reduce_cython__(self):
10283  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10284  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
10285  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
10286  */
10287 
10288  /* function exit code */
10289  __pyx_L1_error:;
10290  __Pyx_XDECREF(__pyx_t_1);
10291  __Pyx_AddTraceback("cmeshTools.CMesh.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
10292  __pyx_r = NULL;
10293  __Pyx_XGIVEREF(__pyx_r);
10294  __Pyx_RefNannyFinishContext();
10295  return __pyx_r;
10296 }
10297 
10298 /* "cmeshTools.pyx":117
10299  * self.volume = self.mesh.volume
10300  *
10301  * def buildPythonMeshInterface(cmesh): # <<<<<<<<<<<<<<
10302  * """
10303  * function to be conform to old module, and to calls from MeshTools
10304  */
10305 
10306 /* Python wrapper */
10307 static PyObject *__pyx_pw_10cmeshTools_1buildPythonMeshInterface(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
10308 static char __pyx_doc_10cmeshTools_buildPythonMeshInterface[] = "\n function to be conform to old module, and to calls from MeshTools\n ";
10309 static PyMethodDef __pyx_mdef_10cmeshTools_1buildPythonMeshInterface = {"buildPythonMeshInterface", (PyCFunction)__pyx_pw_10cmeshTools_1buildPythonMeshInterface, METH_O, __pyx_doc_10cmeshTools_buildPythonMeshInterface};
10310 static PyObject *__pyx_pw_10cmeshTools_1buildPythonMeshInterface(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
10311  PyObject *__pyx_r = 0;
10312  __Pyx_RefNannyDeclarations
10313  __Pyx_RefNannySetupContext("buildPythonMeshInterface (wrapper)", 0);
10314  __pyx_r = __pyx_pf_10cmeshTools_buildPythonMeshInterface(__pyx_self, ((PyObject *)__pyx_v_cmesh));
10315 
10316  /* function exit code */
10317  __Pyx_RefNannyFinishContext();
10318  return __pyx_r;
10319 }
10320 
10321 static PyObject *__pyx_pf_10cmeshTools_buildPythonMeshInterface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
10322  PyObject *__pyx_r = NULL;
10323  __Pyx_RefNannyDeclarations
10324  PyObject *__pyx_t_1 = NULL;
10325  PyObject *__pyx_t_2 = NULL;
10326  PyObject *__pyx_t_3 = NULL;
10327  PyObject *__pyx_t_4 = NULL;
10328  PyObject *__pyx_t_5 = NULL;
10329  PyObject *__pyx_t_6 = NULL;
10330  PyObject *__pyx_t_7 = NULL;
10331  PyObject *__pyx_t_8 = NULL;
10332  PyObject *__pyx_t_9 = NULL;
10333  PyObject *__pyx_t_10 = NULL;
10334  PyObject *__pyx_t_11 = NULL;
10335  PyObject *__pyx_t_12 = NULL;
10336  PyObject *__pyx_t_13 = NULL;
10337  PyObject *__pyx_t_14 = NULL;
10338  PyObject *__pyx_t_15 = NULL;
10339  PyObject *__pyx_t_16 = NULL;
10340  PyObject *__pyx_t_17 = NULL;
10341  PyObject *__pyx_t_18 = NULL;
10342  PyObject *__pyx_t_19 = NULL;
10343  PyObject *__pyx_t_20 = NULL;
10344  PyObject *__pyx_t_21 = NULL;
10345  PyObject *__pyx_t_22 = NULL;
10346  PyObject *__pyx_t_23 = NULL;
10347  PyObject *__pyx_t_24 = NULL;
10348  PyObject *__pyx_t_25 = NULL;
10349  PyObject *__pyx_t_26 = NULL;
10350  PyObject *__pyx_t_27 = NULL;
10351  PyObject *__pyx_t_28 = NULL;
10352  PyObject *__pyx_t_29 = NULL;
10353  PyObject *__pyx_t_30 = NULL;
10354  PyObject *__pyx_t_31 = NULL;
10355  PyObject *__pyx_t_32 = NULL;
10356  PyObject *__pyx_t_33 = NULL;
10357  PyObject *__pyx_t_34 = NULL;
10358  PyObject *__pyx_t_35 = NULL;
10359  PyObject *__pyx_t_36 = NULL;
10360  PyObject *__pyx_t_37 = NULL;
10361  PyObject *__pyx_t_38 = NULL;
10362  PyObject *__pyx_t_39 = NULL;
10363  PyObject *__pyx_t_40 = NULL;
10364  PyObject *__pyx_t_41 = NULL;
10365  PyObject *__pyx_t_42 = NULL;
10366  PyObject *__pyx_t_43 = NULL;
10367  PyObject *__pyx_t_44 = NULL;
10368  PyObject *__pyx_t_45 = NULL;
10369  PyObject *__pyx_t_46 = NULL;
10370  PyObject *__pyx_t_47 = NULL;
10371  PyObject *__pyx_t_48 = NULL;
10372  PyObject *__pyx_t_49 = NULL;
10373  PyObject *__pyx_t_50 = NULL;
10374  PyObject *__pyx_t_51 = NULL;
10375  __Pyx_RefNannySetupContext("buildPythonMeshInterface", 0);
10376 
10377  /* "cmeshTools.pyx":121
10378  * function to be conform to old module, and to calls from MeshTools
10379  * """
10380  * cmesh.buildPythonMeshInterface() # <<<<<<<<<<<<<<
10381  * return (cmesh.nElements_global,
10382  * cmesh.nNodes_global,
10383  */
10384  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_buildPythonMeshInterface); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 121, __pyx_L1_error)
10385  __Pyx_GOTREF(__pyx_t_2);
10386  __pyx_t_3 = NULL;
10387  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
10388  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
10389  if (likely(__pyx_t_3)) {
10390  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
10391  __Pyx_INCREF(__pyx_t_3);
10392  __Pyx_INCREF(function);
10393  __Pyx_DECREF_SET(__pyx_t_2, function);
10394  }
10395  }
10396  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
10397  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10398  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 121, __pyx_L1_error)
10399  __Pyx_GOTREF(__pyx_t_1);
10400  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10401  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10402 
10403  /* "cmeshTools.pyx":122
10404  * """
10405  * cmesh.buildPythonMeshInterface()
10406  * return (cmesh.nElements_global, # <<<<<<<<<<<<<<
10407  * cmesh.nNodes_global,
10408  * cmesh.nNodes_element,
10409  */
10410  __Pyx_XDECREF(__pyx_r);
10411  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 122, __pyx_L1_error)
10412  __Pyx_GOTREF(__pyx_t_1);
10413 
10414  /* "cmeshTools.pyx":123
10415  * cmesh.buildPythonMeshInterface()
10416  * return (cmesh.nElements_global,
10417  * cmesh.nNodes_global, # <<<<<<<<<<<<<<
10418  * cmesh.nNodes_element,
10419  * cmesh.nNodes_elementBoundary,
10420  */
10421  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 123, __pyx_L1_error)
10422  __Pyx_GOTREF(__pyx_t_2);
10423 
10424  /* "cmeshTools.pyx":124
10425  * return (cmesh.nElements_global,
10426  * cmesh.nNodes_global,
10427  * cmesh.nNodes_element, # <<<<<<<<<<<<<<
10428  * cmesh.nNodes_elementBoundary,
10429  * cmesh.nElementBoundaries_element,
10430  */
10431  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_element); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 124, __pyx_L1_error)
10432  __Pyx_GOTREF(__pyx_t_3);
10433 
10434  /* "cmeshTools.pyx":125
10435  * cmesh.nNodes_global,
10436  * cmesh.nNodes_element,
10437  * cmesh.nNodes_elementBoundary, # <<<<<<<<<<<<<<
10438  * cmesh.nElementBoundaries_element,
10439  * cmesh.nElementBoundaries_global,
10440  */
10441  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_elementBoundary); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 125, __pyx_L1_error)
10442  __Pyx_GOTREF(__pyx_t_4);
10443 
10444  /* "cmeshTools.pyx":126
10445  * cmesh.nNodes_element,
10446  * cmesh.nNodes_elementBoundary,
10447  * cmesh.nElementBoundaries_element, # <<<<<<<<<<<<<<
10448  * cmesh.nElementBoundaries_global,
10449  * cmesh.nInteriorElementBoundaries_global,
10450  */
10451  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElementBoundaries_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 126, __pyx_L1_error)
10452  __Pyx_GOTREF(__pyx_t_5);
10453 
10454  /* "cmeshTools.pyx":127
10455  * cmesh.nNodes_elementBoundary,
10456  * cmesh.nElementBoundaries_element,
10457  * cmesh.nElementBoundaries_global, # <<<<<<<<<<<<<<
10458  * cmesh.nInteriorElementBoundaries_global,
10459  * cmesh.nExteriorElementBoundaries_global,
10460  */
10461  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElementBoundaries_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 127, __pyx_L1_error)
10462  __Pyx_GOTREF(__pyx_t_6);
10463 
10464  /* "cmeshTools.pyx":128
10465  * cmesh.nElementBoundaries_element,
10466  * cmesh.nElementBoundaries_global,
10467  * cmesh.nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
10468  * cmesh.nExteriorElementBoundaries_global,
10469  * cmesh.max_nElements_node,
10470  */
10471  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nInteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 128, __pyx_L1_error)
10472  __Pyx_GOTREF(__pyx_t_7);
10473 
10474  /* "cmeshTools.pyx":129
10475  * cmesh.nElementBoundaries_global,
10476  * cmesh.nInteriorElementBoundaries_global,
10477  * cmesh.nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
10478  * cmesh.max_nElements_node,
10479  * cmesh.nEdges_global,
10480  */
10481  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 129, __pyx_L1_error)
10482  __Pyx_GOTREF(__pyx_t_8);
10483 
10484  /* "cmeshTools.pyx":130
10485  * cmesh.nInteriorElementBoundaries_global,
10486  * cmesh.nExteriorElementBoundaries_global,
10487  * cmesh.max_nElements_node, # <<<<<<<<<<<<<<
10488  * cmesh.nEdges_global,
10489  * cmesh.max_nNodeNeighbors_node,
10490  */
10491  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_max_nElements_node); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 130, __pyx_L1_error)
10492  __Pyx_GOTREF(__pyx_t_9);
10493 
10494  /* "cmeshTools.pyx":131
10495  * cmesh.nExteriorElementBoundaries_global,
10496  * cmesh.max_nElements_node,
10497  * cmesh.nEdges_global, # <<<<<<<<<<<<<<
10498  * cmesh.max_nNodeNeighbors_node,
10499  * cmesh.elementNodesArray,
10500  */
10501  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nEdges_global); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 131, __pyx_L1_error)
10502  __Pyx_GOTREF(__pyx_t_10);
10503 
10504  /* "cmeshTools.pyx":132
10505  * cmesh.max_nElements_node,
10506  * cmesh.nEdges_global,
10507  * cmesh.max_nNodeNeighbors_node, # <<<<<<<<<<<<<<
10508  * cmesh.elementNodesArray,
10509  * cmesh.nodeElementsArray,
10510  */
10511  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_max_nNodeNeighbors_node); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 132, __pyx_L1_error)
10512  __Pyx_GOTREF(__pyx_t_11);
10513 
10514  /* "cmeshTools.pyx":133
10515  * cmesh.nEdges_global,
10516  * cmesh.max_nNodeNeighbors_node,
10517  * cmesh.elementNodesArray, # <<<<<<<<<<<<<<
10518  * cmesh.nodeElementsArray,
10519  * cmesh.nodeElementOffsets,
10520  */
10521  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementNodesArray); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 133, __pyx_L1_error)
10522  __Pyx_GOTREF(__pyx_t_12);
10523 
10524  /* "cmeshTools.pyx":134
10525  * cmesh.max_nNodeNeighbors_node,
10526  * cmesh.elementNodesArray,
10527  * cmesh.nodeElementsArray, # <<<<<<<<<<<<<<
10528  * cmesh.nodeElementOffsets,
10529  * cmesh.elementNeighborsArray,
10530  */
10531  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeElementsArray); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 134, __pyx_L1_error)
10532  __Pyx_GOTREF(__pyx_t_13);
10533 
10534  /* "cmeshTools.pyx":135
10535  * cmesh.elementNodesArray,
10536  * cmesh.nodeElementsArray,
10537  * cmesh.nodeElementOffsets, # <<<<<<<<<<<<<<
10538  * cmesh.elementNeighborsArray,
10539  * cmesh.elementBoundariesArray,
10540  */
10541  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeElementOffsets); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 135, __pyx_L1_error)
10542  __Pyx_GOTREF(__pyx_t_14);
10543 
10544  /* "cmeshTools.pyx":136
10545  * cmesh.nodeElementsArray,
10546  * cmesh.nodeElementOffsets,
10547  * cmesh.elementNeighborsArray, # <<<<<<<<<<<<<<
10548  * cmesh.elementBoundariesArray,
10549  * cmesh.elementBoundaryNodesArray,
10550  */
10551  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementNeighborsArray); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 136, __pyx_L1_error)
10552  __Pyx_GOTREF(__pyx_t_15);
10553 
10554  /* "cmeshTools.pyx":137
10555  * cmesh.nodeElementOffsets,
10556  * cmesh.elementNeighborsArray,
10557  * cmesh.elementBoundariesArray, # <<<<<<<<<<<<<<
10558  * cmesh.elementBoundaryNodesArray,
10559  * cmesh.elementBoundaryElementsArray,
10560  */
10561  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundariesArray); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 137, __pyx_L1_error)
10562  __Pyx_GOTREF(__pyx_t_16);
10563 
10564  /* "cmeshTools.pyx":138
10565  * cmesh.elementNeighborsArray,
10566  * cmesh.elementBoundariesArray,
10567  * cmesh.elementBoundaryNodesArray, # <<<<<<<<<<<<<<
10568  * cmesh.elementBoundaryElementsArray,
10569  * cmesh.elementBoundaryLocalElementBoundariesArray,
10570  */
10571  __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryNodesArray); if (unlikely(!__pyx_t_17)) __PYX_ERR(1, 138, __pyx_L1_error)
10572  __Pyx_GOTREF(__pyx_t_17);
10573 
10574  /* "cmeshTools.pyx":139
10575  * cmesh.elementBoundariesArray,
10576  * cmesh.elementBoundaryNodesArray,
10577  * cmesh.elementBoundaryElementsArray, # <<<<<<<<<<<<<<
10578  * cmesh.elementBoundaryLocalElementBoundariesArray,
10579  * cmesh.interiorElementBoundariesArray,
10580  */
10581  __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryElementsArray); if (unlikely(!__pyx_t_18)) __PYX_ERR(1, 139, __pyx_L1_error)
10582  __Pyx_GOTREF(__pyx_t_18);
10583 
10584  /* "cmeshTools.pyx":140
10585  * cmesh.elementBoundaryNodesArray,
10586  * cmesh.elementBoundaryElementsArray,
10587  * cmesh.elementBoundaryLocalElementBoundariesArray, # <<<<<<<<<<<<<<
10588  * cmesh.interiorElementBoundariesArray,
10589  * cmesh.exteriorElementBoundariesArray,
10590  */
10591  __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryLocalElementBound); if (unlikely(!__pyx_t_19)) __PYX_ERR(1, 140, __pyx_L1_error)
10592  __Pyx_GOTREF(__pyx_t_19);
10593 
10594  /* "cmeshTools.pyx":141
10595  * cmesh.elementBoundaryElementsArray,
10596  * cmesh.elementBoundaryLocalElementBoundariesArray,
10597  * cmesh.interiorElementBoundariesArray, # <<<<<<<<<<<<<<
10598  * cmesh.exteriorElementBoundariesArray,
10599  * cmesh.edgeNodesArray,
10600  */
10601  __pyx_t_20 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_interiorElementBoundariesArray); if (unlikely(!__pyx_t_20)) __PYX_ERR(1, 141, __pyx_L1_error)
10602  __Pyx_GOTREF(__pyx_t_20);
10603 
10604  /* "cmeshTools.pyx":142
10605  * cmesh.elementBoundaryLocalElementBoundariesArray,
10606  * cmesh.interiorElementBoundariesArray,
10607  * cmesh.exteriorElementBoundariesArray, # <<<<<<<<<<<<<<
10608  * cmesh.edgeNodesArray,
10609  * cmesh.nodeStarArray,
10610  */
10611  __pyx_t_21 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_exteriorElementBoundariesArray); if (unlikely(!__pyx_t_21)) __PYX_ERR(1, 142, __pyx_L1_error)
10612  __Pyx_GOTREF(__pyx_t_21);
10613 
10614  /* "cmeshTools.pyx":143
10615  * cmesh.interiorElementBoundariesArray,
10616  * cmesh.exteriorElementBoundariesArray,
10617  * cmesh.edgeNodesArray, # <<<<<<<<<<<<<<
10618  * cmesh.nodeStarArray,
10619  * cmesh.nodeStarOffsets,
10620  */
10621  __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_edgeNodesArray); if (unlikely(!__pyx_t_22)) __PYX_ERR(1, 143, __pyx_L1_error)
10622  __Pyx_GOTREF(__pyx_t_22);
10623 
10624  /* "cmeshTools.pyx":144
10625  * cmesh.exteriorElementBoundariesArray,
10626  * cmesh.edgeNodesArray,
10627  * cmesh.nodeStarArray, # <<<<<<<<<<<<<<
10628  * cmesh.nodeStarOffsets,
10629  * cmesh.elementMaterialTypes,
10630  */
10631  __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeStarArray); if (unlikely(!__pyx_t_23)) __PYX_ERR(1, 144, __pyx_L1_error)
10632  __Pyx_GOTREF(__pyx_t_23);
10633 
10634  /* "cmeshTools.pyx":145
10635  * cmesh.edgeNodesArray,
10636  * cmesh.nodeStarArray,
10637  * cmesh.nodeStarOffsets, # <<<<<<<<<<<<<<
10638  * cmesh.elementMaterialTypes,
10639  * cmesh.elementBoundaryMaterialTypes,
10640  */
10641  __pyx_t_24 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeStarOffsets); if (unlikely(!__pyx_t_24)) __PYX_ERR(1, 145, __pyx_L1_error)
10642  __Pyx_GOTREF(__pyx_t_24);
10643 
10644  /* "cmeshTools.pyx":146
10645  * cmesh.nodeStarArray,
10646  * cmesh.nodeStarOffsets,
10647  * cmesh.elementMaterialTypes, # <<<<<<<<<<<<<<
10648  * cmesh.elementBoundaryMaterialTypes,
10649  * cmesh.nodeMaterialTypes,
10650  */
10651  __pyx_t_25 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementMaterialTypes); if (unlikely(!__pyx_t_25)) __PYX_ERR(1, 146, __pyx_L1_error)
10652  __Pyx_GOTREF(__pyx_t_25);
10653 
10654  /* "cmeshTools.pyx":147
10655  * cmesh.nodeStarOffsets,
10656  * cmesh.elementMaterialTypes,
10657  * cmesh.elementBoundaryMaterialTypes, # <<<<<<<<<<<<<<
10658  * cmesh.nodeMaterialTypes,
10659  * cmesh.nodeArray,
10660  */
10661  __pyx_t_26 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryMaterialTypes); if (unlikely(!__pyx_t_26)) __PYX_ERR(1, 147, __pyx_L1_error)
10662  __Pyx_GOTREF(__pyx_t_26);
10663 
10664  /* "cmeshTools.pyx":148
10665  * cmesh.elementMaterialTypes,
10666  * cmesh.elementBoundaryMaterialTypes,
10667  * cmesh.nodeMaterialTypes, # <<<<<<<<<<<<<<
10668  * cmesh.nodeArray,
10669  * cmesh.nx,
10670  */
10671  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeMaterialTypes); if (unlikely(!__pyx_t_27)) __PYX_ERR(1, 148, __pyx_L1_error)
10672  __Pyx_GOTREF(__pyx_t_27);
10673 
10674  /* "cmeshTools.pyx":149
10675  * cmesh.elementBoundaryMaterialTypes,
10676  * cmesh.nodeMaterialTypes,
10677  * cmesh.nodeArray, # <<<<<<<<<<<<<<
10678  * cmesh.nx,
10679  * cmesh.ny,
10680  */
10681  __pyx_t_28 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeArray); if (unlikely(!__pyx_t_28)) __PYX_ERR(1, 149, __pyx_L1_error)
10682  __Pyx_GOTREF(__pyx_t_28);
10683 
10684  /* "cmeshTools.pyx":150
10685  * cmesh.nodeMaterialTypes,
10686  * cmesh.nodeArray,
10687  * cmesh.nx, # <<<<<<<<<<<<<<
10688  * cmesh.ny,
10689  * cmesh.nz,
10690  */
10691  __pyx_t_29 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nx); if (unlikely(!__pyx_t_29)) __PYX_ERR(1, 150, __pyx_L1_error)
10692  __Pyx_GOTREF(__pyx_t_29);
10693 
10694  /* "cmeshTools.pyx":151
10695  * cmesh.nodeArray,
10696  * cmesh.nx,
10697  * cmesh.ny, # <<<<<<<<<<<<<<
10698  * cmesh.nz,
10699  * cmesh.px,
10700  */
10701  __pyx_t_30 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_ny); if (unlikely(!__pyx_t_30)) __PYX_ERR(1, 151, __pyx_L1_error)
10702  __Pyx_GOTREF(__pyx_t_30);
10703 
10704  /* "cmeshTools.pyx":152
10705  * cmesh.nx,
10706  * cmesh.ny,
10707  * cmesh.nz, # <<<<<<<<<<<<<<
10708  * cmesh.px,
10709  * cmesh.py,
10710  */
10711  __pyx_t_31 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nz); if (unlikely(!__pyx_t_31)) __PYX_ERR(1, 152, __pyx_L1_error)
10712  __Pyx_GOTREF(__pyx_t_31);
10713 
10714  /* "cmeshTools.pyx":153
10715  * cmesh.ny,
10716  * cmesh.nz,
10717  * cmesh.px, # <<<<<<<<<<<<<<
10718  * cmesh.py,
10719  * cmesh.pz,
10720  */
10721  __pyx_t_32 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_px); if (unlikely(!__pyx_t_32)) __PYX_ERR(1, 153, __pyx_L1_error)
10722  __Pyx_GOTREF(__pyx_t_32);
10723 
10724  /* "cmeshTools.pyx":154
10725  * cmesh.nz,
10726  * cmesh.px,
10727  * cmesh.py, # <<<<<<<<<<<<<<
10728  * cmesh.pz,
10729  * cmesh.elementIJK,
10730  */
10731  __pyx_t_33 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_py); if (unlikely(!__pyx_t_33)) __PYX_ERR(1, 154, __pyx_L1_error)
10732  __Pyx_GOTREF(__pyx_t_33);
10733 
10734  /* "cmeshTools.pyx":155
10735  * cmesh.px,
10736  * cmesh.py,
10737  * cmesh.pz, # <<<<<<<<<<<<<<
10738  * cmesh.elementIJK,
10739  * cmesh.weights,
10740  */
10741  __pyx_t_34 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_pz); if (unlikely(!__pyx_t_34)) __PYX_ERR(1, 155, __pyx_L1_error)
10742  __Pyx_GOTREF(__pyx_t_34);
10743 
10744  /* "cmeshTools.pyx":156
10745  * cmesh.py,
10746  * cmesh.pz,
10747  * cmesh.elementIJK, # <<<<<<<<<<<<<<
10748  * cmesh.weights,
10749  * cmesh.U_KNOT,
10750  */
10751  __pyx_t_35 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementIJK); if (unlikely(!__pyx_t_35)) __PYX_ERR(1, 156, __pyx_L1_error)
10752  __Pyx_GOTREF(__pyx_t_35);
10753 
10754  /* "cmeshTools.pyx":157
10755  * cmesh.pz,
10756  * cmesh.elementIJK,
10757  * cmesh.weights, # <<<<<<<<<<<<<<
10758  * cmesh.U_KNOT,
10759  * cmesh.V_KNOT,
10760  */
10761  __pyx_t_36 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_weights); if (unlikely(!__pyx_t_36)) __PYX_ERR(1, 157, __pyx_L1_error)
10762  __Pyx_GOTREF(__pyx_t_36);
10763 
10764  /* "cmeshTools.pyx":158
10765  * cmesh.elementIJK,
10766  * cmesh.weights,
10767  * cmesh.U_KNOT, # <<<<<<<<<<<<<<
10768  * cmesh.V_KNOT,
10769  * cmesh.W_KNOT,
10770  */
10771  __pyx_t_37 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_U_KNOT); if (unlikely(!__pyx_t_37)) __PYX_ERR(1, 158, __pyx_L1_error)
10772  __Pyx_GOTREF(__pyx_t_37);
10773 
10774  /* "cmeshTools.pyx":159
10775  * cmesh.weights,
10776  * cmesh.U_KNOT,
10777  * cmesh.V_KNOT, # <<<<<<<<<<<<<<
10778  * cmesh.W_KNOT,
10779  * cmesh.elementDiametersArray,
10780  */
10781  __pyx_t_38 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_V_KNOT); if (unlikely(!__pyx_t_38)) __PYX_ERR(1, 159, __pyx_L1_error)
10782  __Pyx_GOTREF(__pyx_t_38);
10783 
10784  /* "cmeshTools.pyx":160
10785  * cmesh.U_KNOT,
10786  * cmesh.V_KNOT,
10787  * cmesh.W_KNOT, # <<<<<<<<<<<<<<
10788  * cmesh.elementDiametersArray,
10789  * cmesh.elementInnerDiametersArray,
10790  */
10791  __pyx_t_39 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_W_KNOT); if (unlikely(!__pyx_t_39)) __PYX_ERR(1, 160, __pyx_L1_error)
10792  __Pyx_GOTREF(__pyx_t_39);
10793 
10794  /* "cmeshTools.pyx":161
10795  * cmesh.V_KNOT,
10796  * cmesh.W_KNOT,
10797  * cmesh.elementDiametersArray, # <<<<<<<<<<<<<<
10798  * cmesh.elementInnerDiametersArray,
10799  * cmesh.elementBoundaryDiametersArray,
10800  */
10801  __pyx_t_40 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementDiametersArray); if (unlikely(!__pyx_t_40)) __PYX_ERR(1, 161, __pyx_L1_error)
10802  __Pyx_GOTREF(__pyx_t_40);
10803 
10804  /* "cmeshTools.pyx":162
10805  * cmesh.W_KNOT,
10806  * cmesh.elementDiametersArray,
10807  * cmesh.elementInnerDiametersArray, # <<<<<<<<<<<<<<
10808  * cmesh.elementBoundaryDiametersArray,
10809  * cmesh.elementBarycentersArray,
10810  */
10811  __pyx_t_41 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementInnerDiametersArray); if (unlikely(!__pyx_t_41)) __PYX_ERR(1, 162, __pyx_L1_error)
10812  __Pyx_GOTREF(__pyx_t_41);
10813 
10814  /* "cmeshTools.pyx":163
10815  * cmesh.elementDiametersArray,
10816  * cmesh.elementInnerDiametersArray,
10817  * cmesh.elementBoundaryDiametersArray, # <<<<<<<<<<<<<<
10818  * cmesh.elementBarycentersArray,
10819  * cmesh.elementBoundaryBarycentersArray,
10820  */
10821  __pyx_t_42 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryDiametersArray); if (unlikely(!__pyx_t_42)) __PYX_ERR(1, 163, __pyx_L1_error)
10822  __Pyx_GOTREF(__pyx_t_42);
10823 
10824  /* "cmeshTools.pyx":164
10825  * cmesh.elementInnerDiametersArray,
10826  * cmesh.elementBoundaryDiametersArray,
10827  * cmesh.elementBarycentersArray, # <<<<<<<<<<<<<<
10828  * cmesh.elementBoundaryBarycentersArray,
10829  * cmesh.nodeDiametersArray,
10830  */
10831  __pyx_t_43 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBarycentersArray); if (unlikely(!__pyx_t_43)) __PYX_ERR(1, 164, __pyx_L1_error)
10832  __Pyx_GOTREF(__pyx_t_43);
10833 
10834  /* "cmeshTools.pyx":165
10835  * cmesh.elementBoundaryDiametersArray,
10836  * cmesh.elementBarycentersArray,
10837  * cmesh.elementBoundaryBarycentersArray, # <<<<<<<<<<<<<<
10838  * cmesh.nodeDiametersArray,
10839  * cmesh.nodeSupportArray,
10840  */
10841  __pyx_t_44 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_elementBoundaryBarycentersArray); if (unlikely(!__pyx_t_44)) __PYX_ERR(1, 165, __pyx_L1_error)
10842  __Pyx_GOTREF(__pyx_t_44);
10843 
10844  /* "cmeshTools.pyx":166
10845  * cmesh.elementBarycentersArray,
10846  * cmesh.elementBoundaryBarycentersArray,
10847  * cmesh.nodeDiametersArray, # <<<<<<<<<<<<<<
10848  * cmesh.nodeSupportArray,
10849  * cmesh.h,
10850  */
10851  __pyx_t_45 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeDiametersArray); if (unlikely(!__pyx_t_45)) __PYX_ERR(1, 166, __pyx_L1_error)
10852  __Pyx_GOTREF(__pyx_t_45);
10853 
10854  /* "cmeshTools.pyx":167
10855  * cmesh.elementBoundaryBarycentersArray,
10856  * cmesh.nodeDiametersArray,
10857  * cmesh.nodeSupportArray, # <<<<<<<<<<<<<<
10858  * cmesh.h,
10859  * cmesh.hMin,
10860  */
10861  __pyx_t_46 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nodeSupportArray); if (unlikely(!__pyx_t_46)) __PYX_ERR(1, 167, __pyx_L1_error)
10862  __Pyx_GOTREF(__pyx_t_46);
10863 
10864  /* "cmeshTools.pyx":168
10865  * cmesh.nodeDiametersArray,
10866  * cmesh.nodeSupportArray,
10867  * cmesh.h, # <<<<<<<<<<<<<<
10868  * cmesh.hMin,
10869  * cmesh.sigmaMax,
10870  */
10871  __pyx_t_47 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_h); if (unlikely(!__pyx_t_47)) __PYX_ERR(1, 168, __pyx_L1_error)
10872  __Pyx_GOTREF(__pyx_t_47);
10873 
10874  /* "cmeshTools.pyx":169
10875  * cmesh.nodeSupportArray,
10876  * cmesh.h,
10877  * cmesh.hMin, # <<<<<<<<<<<<<<
10878  * cmesh.sigmaMax,
10879  * cmesh.volume)
10880  */
10881  __pyx_t_48 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_hMin); if (unlikely(!__pyx_t_48)) __PYX_ERR(1, 169, __pyx_L1_error)
10882  __Pyx_GOTREF(__pyx_t_48);
10883 
10884  /* "cmeshTools.pyx":170
10885  * cmesh.h,
10886  * cmesh.hMin,
10887  * cmesh.sigmaMax, # <<<<<<<<<<<<<<
10888  * cmesh.volume)
10889  *
10890  */
10891  __pyx_t_49 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_sigmaMax); if (unlikely(!__pyx_t_49)) __PYX_ERR(1, 170, __pyx_L1_error)
10892  __Pyx_GOTREF(__pyx_t_49);
10893 
10894  /* "cmeshTools.pyx":171
10895  * cmesh.hMin,
10896  * cmesh.sigmaMax,
10897  * cmesh.volume) # <<<<<<<<<<<<<<
10898  *
10899  * def buildPythonMeshInterfaceNoArrays(cmesh):
10900  */
10901  __pyx_t_50 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_volume); if (unlikely(!__pyx_t_50)) __PYX_ERR(1, 171, __pyx_L1_error)
10902  __Pyx_GOTREF(__pyx_t_50);
10903 
10904  /* "cmeshTools.pyx":122
10905  * """
10906  * cmesh.buildPythonMeshInterface()
10907  * return (cmesh.nElements_global, # <<<<<<<<<<<<<<
10908  * cmesh.nNodes_global,
10909  * cmesh.nNodes_element,
10910  */
10911  __pyx_t_51 = PyTuple_New(50); if (unlikely(!__pyx_t_51)) __PYX_ERR(1, 122, __pyx_L1_error)
10912  __Pyx_GOTREF(__pyx_t_51);
10913  __Pyx_GIVEREF(__pyx_t_1);
10914  PyTuple_SET_ITEM(__pyx_t_51, 0, __pyx_t_1);
10915  __Pyx_GIVEREF(__pyx_t_2);
10916  PyTuple_SET_ITEM(__pyx_t_51, 1, __pyx_t_2);
10917  __Pyx_GIVEREF(__pyx_t_3);
10918  PyTuple_SET_ITEM(__pyx_t_51, 2, __pyx_t_3);
10919  __Pyx_GIVEREF(__pyx_t_4);
10920  PyTuple_SET_ITEM(__pyx_t_51, 3, __pyx_t_4);
10921  __Pyx_GIVEREF(__pyx_t_5);
10922  PyTuple_SET_ITEM(__pyx_t_51, 4, __pyx_t_5);
10923  __Pyx_GIVEREF(__pyx_t_6);
10924  PyTuple_SET_ITEM(__pyx_t_51, 5, __pyx_t_6);
10925  __Pyx_GIVEREF(__pyx_t_7);
10926  PyTuple_SET_ITEM(__pyx_t_51, 6, __pyx_t_7);
10927  __Pyx_GIVEREF(__pyx_t_8);
10928  PyTuple_SET_ITEM(__pyx_t_51, 7, __pyx_t_8);
10929  __Pyx_GIVEREF(__pyx_t_9);
10930  PyTuple_SET_ITEM(__pyx_t_51, 8, __pyx_t_9);
10931  __Pyx_GIVEREF(__pyx_t_10);
10932  PyTuple_SET_ITEM(__pyx_t_51, 9, __pyx_t_10);
10933  __Pyx_GIVEREF(__pyx_t_11);
10934  PyTuple_SET_ITEM(__pyx_t_51, 10, __pyx_t_11);
10935  __Pyx_GIVEREF(__pyx_t_12);
10936  PyTuple_SET_ITEM(__pyx_t_51, 11, __pyx_t_12);
10937  __Pyx_GIVEREF(__pyx_t_13);
10938  PyTuple_SET_ITEM(__pyx_t_51, 12, __pyx_t_13);
10939  __Pyx_GIVEREF(__pyx_t_14);
10940  PyTuple_SET_ITEM(__pyx_t_51, 13, __pyx_t_14);
10941  __Pyx_GIVEREF(__pyx_t_15);
10942  PyTuple_SET_ITEM(__pyx_t_51, 14, __pyx_t_15);
10943  __Pyx_GIVEREF(__pyx_t_16);
10944  PyTuple_SET_ITEM(__pyx_t_51, 15, __pyx_t_16);
10945  __Pyx_GIVEREF(__pyx_t_17);
10946  PyTuple_SET_ITEM(__pyx_t_51, 16, __pyx_t_17);
10947  __Pyx_GIVEREF(__pyx_t_18);
10948  PyTuple_SET_ITEM(__pyx_t_51, 17, __pyx_t_18);
10949  __Pyx_GIVEREF(__pyx_t_19);
10950  PyTuple_SET_ITEM(__pyx_t_51, 18, __pyx_t_19);
10951  __Pyx_GIVEREF(__pyx_t_20);
10952  PyTuple_SET_ITEM(__pyx_t_51, 19, __pyx_t_20);
10953  __Pyx_GIVEREF(__pyx_t_21);
10954  PyTuple_SET_ITEM(__pyx_t_51, 20, __pyx_t_21);
10955  __Pyx_GIVEREF(__pyx_t_22);
10956  PyTuple_SET_ITEM(__pyx_t_51, 21, __pyx_t_22);
10957  __Pyx_GIVEREF(__pyx_t_23);
10958  PyTuple_SET_ITEM(__pyx_t_51, 22, __pyx_t_23);
10959  __Pyx_GIVEREF(__pyx_t_24);
10960  PyTuple_SET_ITEM(__pyx_t_51, 23, __pyx_t_24);
10961  __Pyx_GIVEREF(__pyx_t_25);
10962  PyTuple_SET_ITEM(__pyx_t_51, 24, __pyx_t_25);
10963  __Pyx_GIVEREF(__pyx_t_26);
10964  PyTuple_SET_ITEM(__pyx_t_51, 25, __pyx_t_26);
10965  __Pyx_GIVEREF(__pyx_t_27);
10966  PyTuple_SET_ITEM(__pyx_t_51, 26, __pyx_t_27);
10967  __Pyx_GIVEREF(__pyx_t_28);
10968  PyTuple_SET_ITEM(__pyx_t_51, 27, __pyx_t_28);
10969  __Pyx_GIVEREF(__pyx_t_29);
10970  PyTuple_SET_ITEM(__pyx_t_51, 28, __pyx_t_29);
10971  __Pyx_GIVEREF(__pyx_t_30);
10972  PyTuple_SET_ITEM(__pyx_t_51, 29, __pyx_t_30);
10973  __Pyx_GIVEREF(__pyx_t_31);
10974  PyTuple_SET_ITEM(__pyx_t_51, 30, __pyx_t_31);
10975  __Pyx_GIVEREF(__pyx_t_32);
10976  PyTuple_SET_ITEM(__pyx_t_51, 31, __pyx_t_32);
10977  __Pyx_GIVEREF(__pyx_t_33);
10978  PyTuple_SET_ITEM(__pyx_t_51, 32, __pyx_t_33);
10979  __Pyx_GIVEREF(__pyx_t_34);
10980  PyTuple_SET_ITEM(__pyx_t_51, 33, __pyx_t_34);
10981  __Pyx_GIVEREF(__pyx_t_35);
10982  PyTuple_SET_ITEM(__pyx_t_51, 34, __pyx_t_35);
10983  __Pyx_GIVEREF(__pyx_t_36);
10984  PyTuple_SET_ITEM(__pyx_t_51, 35, __pyx_t_36);
10985  __Pyx_GIVEREF(__pyx_t_37);
10986  PyTuple_SET_ITEM(__pyx_t_51, 36, __pyx_t_37);
10987  __Pyx_GIVEREF(__pyx_t_38);
10988  PyTuple_SET_ITEM(__pyx_t_51, 37, __pyx_t_38);
10989  __Pyx_GIVEREF(__pyx_t_39);
10990  PyTuple_SET_ITEM(__pyx_t_51, 38, __pyx_t_39);
10991  __Pyx_GIVEREF(__pyx_t_40);
10992  PyTuple_SET_ITEM(__pyx_t_51, 39, __pyx_t_40);
10993  __Pyx_GIVEREF(__pyx_t_41);
10994  PyTuple_SET_ITEM(__pyx_t_51, 40, __pyx_t_41);
10995  __Pyx_GIVEREF(__pyx_t_42);
10996  PyTuple_SET_ITEM(__pyx_t_51, 41, __pyx_t_42);
10997  __Pyx_GIVEREF(__pyx_t_43);
10998  PyTuple_SET_ITEM(__pyx_t_51, 42, __pyx_t_43);
10999  __Pyx_GIVEREF(__pyx_t_44);
11000  PyTuple_SET_ITEM(__pyx_t_51, 43, __pyx_t_44);
11001  __Pyx_GIVEREF(__pyx_t_45);
11002  PyTuple_SET_ITEM(__pyx_t_51, 44, __pyx_t_45);
11003  __Pyx_GIVEREF(__pyx_t_46);
11004  PyTuple_SET_ITEM(__pyx_t_51, 45, __pyx_t_46);
11005  __Pyx_GIVEREF(__pyx_t_47);
11006  PyTuple_SET_ITEM(__pyx_t_51, 46, __pyx_t_47);
11007  __Pyx_GIVEREF(__pyx_t_48);
11008  PyTuple_SET_ITEM(__pyx_t_51, 47, __pyx_t_48);
11009  __Pyx_GIVEREF(__pyx_t_49);
11010  PyTuple_SET_ITEM(__pyx_t_51, 48, __pyx_t_49);
11011  __Pyx_GIVEREF(__pyx_t_50);
11012  PyTuple_SET_ITEM(__pyx_t_51, 49, __pyx_t_50);
11013  __pyx_t_1 = 0;
11014  __pyx_t_2 = 0;
11015  __pyx_t_3 = 0;
11016  __pyx_t_4 = 0;
11017  __pyx_t_5 = 0;
11018  __pyx_t_6 = 0;
11019  __pyx_t_7 = 0;
11020  __pyx_t_8 = 0;
11021  __pyx_t_9 = 0;
11022  __pyx_t_10 = 0;
11023  __pyx_t_11 = 0;
11024  __pyx_t_12 = 0;
11025  __pyx_t_13 = 0;
11026  __pyx_t_14 = 0;
11027  __pyx_t_15 = 0;
11028  __pyx_t_16 = 0;
11029  __pyx_t_17 = 0;
11030  __pyx_t_18 = 0;
11031  __pyx_t_19 = 0;
11032  __pyx_t_20 = 0;
11033  __pyx_t_21 = 0;
11034  __pyx_t_22 = 0;
11035  __pyx_t_23 = 0;
11036  __pyx_t_24 = 0;
11037  __pyx_t_25 = 0;
11038  __pyx_t_26 = 0;
11039  __pyx_t_27 = 0;
11040  __pyx_t_28 = 0;
11041  __pyx_t_29 = 0;
11042  __pyx_t_30 = 0;
11043  __pyx_t_31 = 0;
11044  __pyx_t_32 = 0;
11045  __pyx_t_33 = 0;
11046  __pyx_t_34 = 0;
11047  __pyx_t_35 = 0;
11048  __pyx_t_36 = 0;
11049  __pyx_t_37 = 0;
11050  __pyx_t_38 = 0;
11051  __pyx_t_39 = 0;
11052  __pyx_t_40 = 0;
11053  __pyx_t_41 = 0;
11054  __pyx_t_42 = 0;
11055  __pyx_t_43 = 0;
11056  __pyx_t_44 = 0;
11057  __pyx_t_45 = 0;
11058  __pyx_t_46 = 0;
11059  __pyx_t_47 = 0;
11060  __pyx_t_48 = 0;
11061  __pyx_t_49 = 0;
11062  __pyx_t_50 = 0;
11063  __pyx_r = __pyx_t_51;
11064  __pyx_t_51 = 0;
11065  goto __pyx_L0;
11066 
11067  /* "cmeshTools.pyx":117
11068  * self.volume = self.mesh.volume
11069  *
11070  * def buildPythonMeshInterface(cmesh): # <<<<<<<<<<<<<<
11071  * """
11072  * function to be conform to old module, and to calls from MeshTools
11073  */
11074 
11075  /* function exit code */
11076  __pyx_L1_error:;
11077  __Pyx_XDECREF(__pyx_t_1);
11078  __Pyx_XDECREF(__pyx_t_2);
11079  __Pyx_XDECREF(__pyx_t_3);
11080  __Pyx_XDECREF(__pyx_t_4);
11081  __Pyx_XDECREF(__pyx_t_5);
11082  __Pyx_XDECREF(__pyx_t_6);
11083  __Pyx_XDECREF(__pyx_t_7);
11084  __Pyx_XDECREF(__pyx_t_8);
11085  __Pyx_XDECREF(__pyx_t_9);
11086  __Pyx_XDECREF(__pyx_t_10);
11087  __Pyx_XDECREF(__pyx_t_11);
11088  __Pyx_XDECREF(__pyx_t_12);
11089  __Pyx_XDECREF(__pyx_t_13);
11090  __Pyx_XDECREF(__pyx_t_14);
11091  __Pyx_XDECREF(__pyx_t_15);
11092  __Pyx_XDECREF(__pyx_t_16);
11093  __Pyx_XDECREF(__pyx_t_17);
11094  __Pyx_XDECREF(__pyx_t_18);
11095  __Pyx_XDECREF(__pyx_t_19);
11096  __Pyx_XDECREF(__pyx_t_20);
11097  __Pyx_XDECREF(__pyx_t_21);
11098  __Pyx_XDECREF(__pyx_t_22);
11099  __Pyx_XDECREF(__pyx_t_23);
11100  __Pyx_XDECREF(__pyx_t_24);
11101  __Pyx_XDECREF(__pyx_t_25);
11102  __Pyx_XDECREF(__pyx_t_26);
11103  __Pyx_XDECREF(__pyx_t_27);
11104  __Pyx_XDECREF(__pyx_t_28);
11105  __Pyx_XDECREF(__pyx_t_29);
11106  __Pyx_XDECREF(__pyx_t_30);
11107  __Pyx_XDECREF(__pyx_t_31);
11108  __Pyx_XDECREF(__pyx_t_32);
11109  __Pyx_XDECREF(__pyx_t_33);
11110  __Pyx_XDECREF(__pyx_t_34);
11111  __Pyx_XDECREF(__pyx_t_35);
11112  __Pyx_XDECREF(__pyx_t_36);
11113  __Pyx_XDECREF(__pyx_t_37);
11114  __Pyx_XDECREF(__pyx_t_38);
11115  __Pyx_XDECREF(__pyx_t_39);
11116  __Pyx_XDECREF(__pyx_t_40);
11117  __Pyx_XDECREF(__pyx_t_41);
11118  __Pyx_XDECREF(__pyx_t_42);
11119  __Pyx_XDECREF(__pyx_t_43);
11120  __Pyx_XDECREF(__pyx_t_44);
11121  __Pyx_XDECREF(__pyx_t_45);
11122  __Pyx_XDECREF(__pyx_t_46);
11123  __Pyx_XDECREF(__pyx_t_47);
11124  __Pyx_XDECREF(__pyx_t_48);
11125  __Pyx_XDECREF(__pyx_t_49);
11126  __Pyx_XDECREF(__pyx_t_50);
11127  __Pyx_XDECREF(__pyx_t_51);
11128  __Pyx_AddTraceback("cmeshTools.buildPythonMeshInterface", __pyx_clineno, __pyx_lineno, __pyx_filename);
11129  __pyx_r = NULL;
11130  __pyx_L0:;
11131  __Pyx_XGIVEREF(__pyx_r);
11132  __Pyx_RefNannyFinishContext();
11133  return __pyx_r;
11134 }
11135 
11136 /* "cmeshTools.pyx":173
11137  * cmesh.volume)
11138  *
11139  * def buildPythonMeshInterfaceNoArrays(cmesh): # <<<<<<<<<<<<<<
11140  * """
11141  * function to be conform to old module, and to calls from MeshTools
11142  */
11143 
11144 /* Python wrapper */
11145 static PyObject *__pyx_pw_10cmeshTools_3buildPythonMeshInterfaceNoArrays(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
11146 static char __pyx_doc_10cmeshTools_2buildPythonMeshInterfaceNoArrays[] = "\n function to be conform to old module, and to calls from MeshTools\n ";
11147 static PyMethodDef __pyx_mdef_10cmeshTools_3buildPythonMeshInterfaceNoArrays = {"buildPythonMeshInterfaceNoArrays", (PyCFunction)__pyx_pw_10cmeshTools_3buildPythonMeshInterfaceNoArrays, METH_O, __pyx_doc_10cmeshTools_2buildPythonMeshInterfaceNoArrays};
11148 static PyObject *__pyx_pw_10cmeshTools_3buildPythonMeshInterfaceNoArrays(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
11149  PyObject *__pyx_r = 0;
11150  __Pyx_RefNannyDeclarations
11151  __Pyx_RefNannySetupContext("buildPythonMeshInterfaceNoArrays (wrapper)", 0);
11152  __pyx_r = __pyx_pf_10cmeshTools_2buildPythonMeshInterfaceNoArrays(__pyx_self, ((PyObject *)__pyx_v_cmesh));
11153 
11154  /* function exit code */
11155  __Pyx_RefNannyFinishContext();
11156  return __pyx_r;
11157 }
11158 
11159 static PyObject *__pyx_pf_10cmeshTools_2buildPythonMeshInterfaceNoArrays(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
11160  PyObject *__pyx_r = NULL;
11161  __Pyx_RefNannyDeclarations
11162  PyObject *__pyx_t_1 = NULL;
11163  PyObject *__pyx_t_2 = NULL;
11164  PyObject *__pyx_t_3 = NULL;
11165  PyObject *__pyx_t_4 = NULL;
11166  PyObject *__pyx_t_5 = NULL;
11167  PyObject *__pyx_t_6 = NULL;
11168  PyObject *__pyx_t_7 = NULL;
11169  PyObject *__pyx_t_8 = NULL;
11170  PyObject *__pyx_t_9 = NULL;
11171  PyObject *__pyx_t_10 = NULL;
11172  PyObject *__pyx_t_11 = NULL;
11173  PyObject *__pyx_t_12 = NULL;
11174  PyObject *__pyx_t_13 = NULL;
11175  PyObject *__pyx_t_14 = NULL;
11176  PyObject *__pyx_t_15 = NULL;
11177  PyObject *__pyx_t_16 = NULL;
11178  __Pyx_RefNannySetupContext("buildPythonMeshInterfaceNoArrays", 0);
11179 
11180  /* "cmeshTools.pyx":177
11181  * function to be conform to old module, and to calls from MeshTools
11182  * """
11183  * cmesh.buildPythonMeshInterfaceNoArrays() # <<<<<<<<<<<<<<
11184  * return (cmesh.nElements_global,
11185  * cmesh.nNodes_global,
11186  */
11187  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_buildPythonMeshInterfaceNoArrays); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 177, __pyx_L1_error)
11188  __Pyx_GOTREF(__pyx_t_2);
11189  __pyx_t_3 = NULL;
11190  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
11191  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
11192  if (likely(__pyx_t_3)) {
11193  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
11194  __Pyx_INCREF(__pyx_t_3);
11195  __Pyx_INCREF(function);
11196  __Pyx_DECREF_SET(__pyx_t_2, function);
11197  }
11198  }
11199  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
11200  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
11201  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 177, __pyx_L1_error)
11202  __Pyx_GOTREF(__pyx_t_1);
11203  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
11204  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11205 
11206  /* "cmeshTools.pyx":178
11207  * """
11208  * cmesh.buildPythonMeshInterfaceNoArrays()
11209  * return (cmesh.nElements_global, # <<<<<<<<<<<<<<
11210  * cmesh.nNodes_global,
11211  * cmesh.nNodes_element,
11212  */
11213  __Pyx_XDECREF(__pyx_r);
11214  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElements_global); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 178, __pyx_L1_error)
11215  __Pyx_GOTREF(__pyx_t_1);
11216 
11217  /* "cmeshTools.pyx":179
11218  * cmesh.buildPythonMeshInterfaceNoArrays()
11219  * return (cmesh.nElements_global,
11220  * cmesh.nNodes_global, # <<<<<<<<<<<<<<
11221  * cmesh.nNodes_element,
11222  * cmesh.nNodes_elementBoundary,
11223  */
11224  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_global); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 179, __pyx_L1_error)
11225  __Pyx_GOTREF(__pyx_t_2);
11226 
11227  /* "cmeshTools.pyx":180
11228  * return (cmesh.nElements_global,
11229  * cmesh.nNodes_global,
11230  * cmesh.nNodes_element, # <<<<<<<<<<<<<<
11231  * cmesh.nNodes_elementBoundary,
11232  * cmesh.nElementBoundaries_element,
11233  */
11234  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_element); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 180, __pyx_L1_error)
11235  __Pyx_GOTREF(__pyx_t_3);
11236 
11237  /* "cmeshTools.pyx":181
11238  * cmesh.nNodes_global,
11239  * cmesh.nNodes_element,
11240  * cmesh.nNodes_elementBoundary, # <<<<<<<<<<<<<<
11241  * cmesh.nElementBoundaries_element,
11242  * cmesh.nElementBoundaries_global,
11243  */
11244  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nNodes_elementBoundary); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 181, __pyx_L1_error)
11245  __Pyx_GOTREF(__pyx_t_4);
11246 
11247  /* "cmeshTools.pyx":182
11248  * cmesh.nNodes_element,
11249  * cmesh.nNodes_elementBoundary,
11250  * cmesh.nElementBoundaries_element, # <<<<<<<<<<<<<<
11251  * cmesh.nElementBoundaries_global,
11252  * cmesh.nInteriorElementBoundaries_global,
11253  */
11254  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElementBoundaries_element); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 182, __pyx_L1_error)
11255  __Pyx_GOTREF(__pyx_t_5);
11256 
11257  /* "cmeshTools.pyx":183
11258  * cmesh.nNodes_elementBoundary,
11259  * cmesh.nElementBoundaries_element,
11260  * cmesh.nElementBoundaries_global, # <<<<<<<<<<<<<<
11261  * cmesh.nInteriorElementBoundaries_global,
11262  * cmesh.nExteriorElementBoundaries_global,
11263  */
11264  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nElementBoundaries_global); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 183, __pyx_L1_error)
11265  __Pyx_GOTREF(__pyx_t_6);
11266 
11267  /* "cmeshTools.pyx":184
11268  * cmesh.nElementBoundaries_element,
11269  * cmesh.nElementBoundaries_global,
11270  * cmesh.nInteriorElementBoundaries_global, # <<<<<<<<<<<<<<
11271  * cmesh.nExteriorElementBoundaries_global,
11272  * cmesh.max_nElements_node,
11273  */
11274  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nInteriorElementBoundaries_globa); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 184, __pyx_L1_error)
11275  __Pyx_GOTREF(__pyx_t_7);
11276 
11277  /* "cmeshTools.pyx":185
11278  * cmesh.nElementBoundaries_global,
11279  * cmesh.nInteriorElementBoundaries_global,
11280  * cmesh.nExteriorElementBoundaries_global, # <<<<<<<<<<<<<<
11281  * cmesh.max_nElements_node,
11282  * cmesh.nEdges_global,
11283  */
11284  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nExteriorElementBoundaries_globa); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 185, __pyx_L1_error)
11285  __Pyx_GOTREF(__pyx_t_8);
11286 
11287  /* "cmeshTools.pyx":186
11288  * cmesh.nInteriorElementBoundaries_global,
11289  * cmesh.nExteriorElementBoundaries_global,
11290  * cmesh.max_nElements_node, # <<<<<<<<<<<<<<
11291  * cmesh.nEdges_global,
11292  * cmesh.max_nNodeNeighbors_node,
11293  */
11294  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_max_nElements_node); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 186, __pyx_L1_error)
11295  __Pyx_GOTREF(__pyx_t_9);
11296 
11297  /* "cmeshTools.pyx":187
11298  * cmesh.nExteriorElementBoundaries_global,
11299  * cmesh.max_nElements_node,
11300  * cmesh.nEdges_global, # <<<<<<<<<<<<<<
11301  * cmesh.max_nNodeNeighbors_node,
11302  * cmesh.h,
11303  */
11304  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_nEdges_global); if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 187, __pyx_L1_error)
11305  __Pyx_GOTREF(__pyx_t_10);
11306 
11307  /* "cmeshTools.pyx":188
11308  * cmesh.max_nElements_node,
11309  * cmesh.nEdges_global,
11310  * cmesh.max_nNodeNeighbors_node, # <<<<<<<<<<<<<<
11311  * cmesh.h,
11312  * cmesh.hMin,
11313  */
11314  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_max_nNodeNeighbors_node); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 188, __pyx_L1_error)
11315  __Pyx_GOTREF(__pyx_t_11);
11316 
11317  /* "cmeshTools.pyx":189
11318  * cmesh.nEdges_global,
11319  * cmesh.max_nNodeNeighbors_node,
11320  * cmesh.h, # <<<<<<<<<<<<<<
11321  * cmesh.hMin,
11322  * cmesh.sigmaMax,
11323  */
11324  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_h); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 189, __pyx_L1_error)
11325  __Pyx_GOTREF(__pyx_t_12);
11326 
11327  /* "cmeshTools.pyx":190
11328  * cmesh.max_nNodeNeighbors_node,
11329  * cmesh.h,
11330  * cmesh.hMin, # <<<<<<<<<<<<<<
11331  * cmesh.sigmaMax,
11332  * cmesh.volume)
11333  */
11334  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_hMin); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 190, __pyx_L1_error)
11335  __Pyx_GOTREF(__pyx_t_13);
11336 
11337  /* "cmeshTools.pyx":191
11338  * cmesh.h,
11339  * cmesh.hMin,
11340  * cmesh.sigmaMax, # <<<<<<<<<<<<<<
11341  * cmesh.volume)
11342  *
11343  */
11344  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_sigmaMax); if (unlikely(!__pyx_t_14)) __PYX_ERR(1, 191, __pyx_L1_error)
11345  __Pyx_GOTREF(__pyx_t_14);
11346 
11347  /* "cmeshTools.pyx":192
11348  * cmesh.hMin,
11349  * cmesh.sigmaMax,
11350  * cmesh.volume) # <<<<<<<<<<<<<<
11351  *
11352  * cdef CMesh CMesh_FromMesh(cppm.Mesh mesh):
11353  */
11354  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmesh, __pyx_n_s_volume); if (unlikely(!__pyx_t_15)) __PYX_ERR(1, 192, __pyx_L1_error)
11355  __Pyx_GOTREF(__pyx_t_15);
11356 
11357  /* "cmeshTools.pyx":178
11358  * """
11359  * cmesh.buildPythonMeshInterfaceNoArrays()
11360  * return (cmesh.nElements_global, # <<<<<<<<<<<<<<
11361  * cmesh.nNodes_global,
11362  * cmesh.nNodes_element,
11363  */
11364  __pyx_t_16 = PyTuple_New(15); if (unlikely(!__pyx_t_16)) __PYX_ERR(1, 178, __pyx_L1_error)
11365  __Pyx_GOTREF(__pyx_t_16);
11366  __Pyx_GIVEREF(__pyx_t_1);
11367  PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_1);
11368  __Pyx_GIVEREF(__pyx_t_2);
11369  PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_2);
11370  __Pyx_GIVEREF(__pyx_t_3);
11371  PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_3);
11372  __Pyx_GIVEREF(__pyx_t_4);
11373  PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_t_4);
11374  __Pyx_GIVEREF(__pyx_t_5);
11375  PyTuple_SET_ITEM(__pyx_t_16, 4, __pyx_t_5);
11376  __Pyx_GIVEREF(__pyx_t_6);
11377  PyTuple_SET_ITEM(__pyx_t_16, 5, __pyx_t_6);
11378  __Pyx_GIVEREF(__pyx_t_7);
11379  PyTuple_SET_ITEM(__pyx_t_16, 6, __pyx_t_7);
11380  __Pyx_GIVEREF(__pyx_t_8);
11381  PyTuple_SET_ITEM(__pyx_t_16, 7, __pyx_t_8);
11382  __Pyx_GIVEREF(__pyx_t_9);
11383  PyTuple_SET_ITEM(__pyx_t_16, 8, __pyx_t_9);
11384  __Pyx_GIVEREF(__pyx_t_10);
11385  PyTuple_SET_ITEM(__pyx_t_16, 9, __pyx_t_10);
11386  __Pyx_GIVEREF(__pyx_t_11);
11387  PyTuple_SET_ITEM(__pyx_t_16, 10, __pyx_t_11);
11388  __Pyx_GIVEREF(__pyx_t_12);
11389  PyTuple_SET_ITEM(__pyx_t_16, 11, __pyx_t_12);
11390  __Pyx_GIVEREF(__pyx_t_13);
11391  PyTuple_SET_ITEM(__pyx_t_16, 12, __pyx_t_13);
11392  __Pyx_GIVEREF(__pyx_t_14);
11393  PyTuple_SET_ITEM(__pyx_t_16, 13, __pyx_t_14);
11394  __Pyx_GIVEREF(__pyx_t_15);
11395  PyTuple_SET_ITEM(__pyx_t_16, 14, __pyx_t_15);
11396  __pyx_t_1 = 0;
11397  __pyx_t_2 = 0;
11398  __pyx_t_3 = 0;
11399  __pyx_t_4 = 0;
11400  __pyx_t_5 = 0;
11401  __pyx_t_6 = 0;
11402  __pyx_t_7 = 0;
11403  __pyx_t_8 = 0;
11404  __pyx_t_9 = 0;
11405  __pyx_t_10 = 0;
11406  __pyx_t_11 = 0;
11407  __pyx_t_12 = 0;
11408  __pyx_t_13 = 0;
11409  __pyx_t_14 = 0;
11410  __pyx_t_15 = 0;
11411  __pyx_r = __pyx_t_16;
11412  __pyx_t_16 = 0;
11413  goto __pyx_L0;
11414 
11415  /* "cmeshTools.pyx":173
11416  * cmesh.volume)
11417  *
11418  * def buildPythonMeshInterfaceNoArrays(cmesh): # <<<<<<<<<<<<<<
11419  * """
11420  * function to be conform to old module, and to calls from MeshTools
11421  */
11422 
11423  /* function exit code */
11424  __pyx_L1_error:;
11425  __Pyx_XDECREF(__pyx_t_1);
11426  __Pyx_XDECREF(__pyx_t_2);
11427  __Pyx_XDECREF(__pyx_t_3);
11428  __Pyx_XDECREF(__pyx_t_4);
11429  __Pyx_XDECREF(__pyx_t_5);
11430  __Pyx_XDECREF(__pyx_t_6);
11431  __Pyx_XDECREF(__pyx_t_7);
11432  __Pyx_XDECREF(__pyx_t_8);
11433  __Pyx_XDECREF(__pyx_t_9);
11434  __Pyx_XDECREF(__pyx_t_10);
11435  __Pyx_XDECREF(__pyx_t_11);
11436  __Pyx_XDECREF(__pyx_t_12);
11437  __Pyx_XDECREF(__pyx_t_13);
11438  __Pyx_XDECREF(__pyx_t_14);
11439  __Pyx_XDECREF(__pyx_t_15);
11440  __Pyx_XDECREF(__pyx_t_16);
11441  __Pyx_AddTraceback("cmeshTools.buildPythonMeshInterfaceNoArrays", __pyx_clineno, __pyx_lineno, __pyx_filename);
11442  __pyx_r = NULL;
11443  __pyx_L0:;
11444  __Pyx_XGIVEREF(__pyx_r);
11445  __Pyx_RefNannyFinishContext();
11446  return __pyx_r;
11447 }
11448 
11449 /* "cmeshTools.pyx":194
11450  * cmesh.volume)
11451  *
11452  * cdef CMesh CMesh_FromMesh(cppm.Mesh mesh): # <<<<<<<<<<<<<<
11453  * CMeshnew = CMesh()
11454  * CMeshnew.mesh = mesh
11455  */
11456 
11457 static struct __pyx_obj_10cmeshTools_CMesh *__pyx_f_10cmeshTools_CMesh_FromMesh(struct Mesh __pyx_v_mesh) {
11458  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_CMeshnew = NULL;
11459  struct __pyx_obj_10cmeshTools_CMesh *__pyx_r = NULL;
11460  __Pyx_RefNannyDeclarations
11461  PyObject *__pyx_t_1 = NULL;
11462  __Pyx_RefNannySetupContext("CMesh_FromMesh", 0);
11463 
11464  /* "cmeshTools.pyx":195
11465  *
11466  * cdef CMesh CMesh_FromMesh(cppm.Mesh mesh):
11467  * CMeshnew = CMesh() # <<<<<<<<<<<<<<
11468  * CMeshnew.mesh = mesh
11469  * return CMeshnew
11470  */
11471  __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_10cmeshTools_CMesh)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 195, __pyx_L1_error)
11472  __Pyx_GOTREF(__pyx_t_1);
11473  __pyx_v_CMeshnew = ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_t_1);
11474  __pyx_t_1 = 0;
11475 
11476  /* "cmeshTools.pyx":196
11477  * cdef CMesh CMesh_FromMesh(cppm.Mesh mesh):
11478  * CMeshnew = CMesh()
11479  * CMeshnew.mesh = mesh # <<<<<<<<<<<<<<
11480  * return CMeshnew
11481  *
11482  */
11483  __pyx_v_CMeshnew->mesh = __pyx_v_mesh;
11484 
11485  /* "cmeshTools.pyx":197
11486  * CMeshnew = CMesh()
11487  * CMeshnew.mesh = mesh
11488  * return CMeshnew # <<<<<<<<<<<<<<
11489  *
11490  * cdef class CMultilevelMesh:
11491  */
11492  __Pyx_XDECREF(((PyObject *)__pyx_r));
11493  __Pyx_INCREF(((PyObject *)__pyx_v_CMeshnew));
11494  __pyx_r = __pyx_v_CMeshnew;
11495  goto __pyx_L0;
11496 
11497  /* "cmeshTools.pyx":194
11498  * cmesh.volume)
11499  *
11500  * cdef CMesh CMesh_FromMesh(cppm.Mesh mesh): # <<<<<<<<<<<<<<
11501  * CMeshnew = CMesh()
11502  * CMeshnew.mesh = mesh
11503  */
11504 
11505  /* function exit code */
11506  __pyx_L1_error:;
11507  __Pyx_XDECREF(__pyx_t_1);
11508  __Pyx_AddTraceback("cmeshTools.CMesh_FromMesh", __pyx_clineno, __pyx_lineno, __pyx_filename);
11509  __pyx_r = 0;
11510  __pyx_L0:;
11511  __Pyx_XDECREF((PyObject *)__pyx_v_CMeshnew);
11512  __Pyx_XGIVEREF((PyObject *)__pyx_r);
11513  __Pyx_RefNannyFinishContext();
11514  return __pyx_r;
11515 }
11516 
11517 /* "cmeshTools.pyx":207
11518  * list elementChildrenArrayList
11519  * list elementChildrenOffsetsList
11520  * def __init__(self, CMesh cmesh, nLevels): # <<<<<<<<<<<<<<
11521  * self.multilevelMesh = cppm.MultilevelMesh()
11522  * if cmesh.mesh.nNodes_element == 2:
11523  */
11524 
11525 /* Python wrapper */
11526 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
11527 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
11528  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
11529  PyObject *__pyx_v_nLevels = 0;
11530  int __pyx_r;
11531  __Pyx_RefNannyDeclarations
11532  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
11533  {
11534  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_nLevels,0};
11535  PyObject* values[2] = {0,0};
11536  if (unlikely(__pyx_kwds)) {
11537  Py_ssize_t kw_args;
11538  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
11539  switch (pos_args) {
11540  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11541  CYTHON_FALLTHROUGH;
11542  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11543  CYTHON_FALLTHROUGH;
11544  case 0: break;
11545  default: goto __pyx_L5_argtuple_error;
11546  }
11547  kw_args = PyDict_Size(__pyx_kwds);
11548  switch (pos_args) {
11549  case 0:
11550  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
11551  else goto __pyx_L5_argtuple_error;
11552  CYTHON_FALLTHROUGH;
11553  case 1:
11554  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nLevels)) != 0)) kw_args--;
11555  else {
11556  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 207, __pyx_L3_error)
11557  }
11558  }
11559  if (unlikely(kw_args > 0)) {
11560  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 207, __pyx_L3_error)
11561  }
11562  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
11563  goto __pyx_L5_argtuple_error;
11564  } else {
11565  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
11566  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
11567  }
11568  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
11569  __pyx_v_nLevels = values[1];
11570  }
11571  goto __pyx_L4_argument_unpacking_done;
11572  __pyx_L5_argtuple_error:;
11573  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 207, __pyx_L3_error)
11574  __pyx_L3_error:;
11575  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
11576  __Pyx_RefNannyFinishContext();
11577  return -1;
11578  __pyx_L4_argument_unpacking_done:;
11579  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 207, __pyx_L1_error)
11580  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh___init__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), __pyx_v_cmesh, __pyx_v_nLevels);
11581 
11582  /* function exit code */
11583  goto __pyx_L0;
11584  __pyx_L1_error:;
11585  __pyx_r = -1;
11586  __pyx_L0:;
11587  __Pyx_RefNannyFinishContext();
11588  return __pyx_r;
11589 }
11590 
11591 static int __pyx_pf_10cmeshTools_15CMultilevelMesh___init__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_nLevels) {
11592  PyObject *__pyx_v_i = NULL;
11593  int __pyx_r;
11594  __Pyx_RefNannyDeclarations
11595  struct MultilevelMesh __pyx_t_1;
11596  int __pyx_t_2;
11597  int __pyx_t_3;
11598  PyObject *__pyx_t_4 = NULL;
11599  PyObject *__pyx_t_5 = NULL;
11600  Py_ssize_t __pyx_t_6;
11601  PyObject *(*__pyx_t_7)(PyObject *);
11602  Py_ssize_t __pyx_t_8;
11603  Py_ssize_t __pyx_t_9;
11604  Py_ssize_t __pyx_t_10;
11605  int __pyx_t_11;
11606  __Pyx_RefNannySetupContext("__init__", 0);
11607 
11608  /* "cmeshTools.pyx":208
11609  * list elementChildrenOffsetsList
11610  * def __init__(self, CMesh cmesh, nLevels):
11611  * self.multilevelMesh = cppm.MultilevelMesh() # <<<<<<<<<<<<<<
11612  * if cmesh.mesh.nNodes_element == 2:
11613  * cppm.globallyRefineEdgeMesh(nLevels,
11614  */
11615  __pyx_v_self->multilevelMesh = __pyx_t_1;
11616 
11617  /* "cmeshTools.pyx":209
11618  * def __init__(self, CMesh cmesh, nLevels):
11619  * self.multilevelMesh = cppm.MultilevelMesh()
11620  * if cmesh.mesh.nNodes_element == 2: # <<<<<<<<<<<<<<
11621  * cppm.globallyRefineEdgeMesh(nLevels,
11622  * cmesh.mesh,
11623  */
11624  __pyx_t_2 = ((__pyx_v_cmesh->mesh.nNodes_element == 2) != 0);
11625  if (__pyx_t_2) {
11626 
11627  /* "cmeshTools.pyx":210
11628  * self.multilevelMesh = cppm.MultilevelMesh()
11629  * if cmesh.mesh.nNodes_element == 2:
11630  * cppm.globallyRefineEdgeMesh(nLevels, # <<<<<<<<<<<<<<
11631  * cmesh.mesh,
11632  * self.multilevelMesh,
11633  */
11634  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 210, __pyx_L1_error)
11635 
11636  /* "cmeshTools.pyx":213
11637  * cmesh.mesh,
11638  * self.multilevelMesh,
11639  * False); # <<<<<<<<<<<<<<
11640  * for i in range(1, nLevels):
11641  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]);
11642  */
11643  (void)(globallyRefineEdgeMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
11644 
11645  /* "cmeshTools.pyx":214
11646  * self.multilevelMesh,
11647  * False);
11648  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
11649  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]);
11650  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11651  */
11652  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 214, __pyx_L1_error)
11653  __Pyx_GOTREF(__pyx_t_4);
11654  __Pyx_INCREF(__pyx_int_1);
11655  __Pyx_GIVEREF(__pyx_int_1);
11656  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
11657  __Pyx_INCREF(__pyx_v_nLevels);
11658  __Pyx_GIVEREF(__pyx_v_nLevels);
11659  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nLevels);
11660  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 214, __pyx_L1_error)
11661  __Pyx_GOTREF(__pyx_t_5);
11662  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11663  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
11664  __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
11665  __pyx_t_7 = NULL;
11666  } else {
11667  __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 214, __pyx_L1_error)
11668  __Pyx_GOTREF(__pyx_t_4);
11669  __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 214, __pyx_L1_error)
11670  }
11671  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11672  for (;;) {
11673  if (likely(!__pyx_t_7)) {
11674  if (likely(PyList_CheckExact(__pyx_t_4))) {
11675  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
11676  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11677  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 214, __pyx_L1_error)
11678  #else
11679  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 214, __pyx_L1_error)
11680  __Pyx_GOTREF(__pyx_t_5);
11681  #endif
11682  } else {
11683  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
11684  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11685  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 214, __pyx_L1_error)
11686  #else
11687  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 214, __pyx_L1_error)
11688  __Pyx_GOTREF(__pyx_t_5);
11689  #endif
11690  }
11691  } else {
11692  __pyx_t_5 = __pyx_t_7(__pyx_t_4);
11693  if (unlikely(!__pyx_t_5)) {
11694  PyObject* exc_type = PyErr_Occurred();
11695  if (exc_type) {
11696  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11697  else __PYX_ERR(1, 214, __pyx_L1_error)
11698  }
11699  break;
11700  }
11701  __Pyx_GOTREF(__pyx_t_5);
11702  }
11703  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
11704  __pyx_t_5 = 0;
11705 
11706  /* "cmeshTools.pyx":215
11707  * False);
11708  * for i in range(1, nLevels):
11709  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
11710  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11711  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11712  */
11713  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 215, __pyx_L1_error)
11714  (void)(constructElementBoundaryElementsArray_edge((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
11715 
11716  /* "cmeshTools.pyx":216
11717  * for i in range(1, nLevels):
11718  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]);
11719  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
11720  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11721  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11722  */
11723  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 216, __pyx_L1_error)
11724  (void)(allocateGeometricInfo_edge((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
11725 
11726  /* "cmeshTools.pyx":217
11727  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]);
11728  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11729  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
11730  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11731  * self.multilevelMesh.meshArray[i],
11732  */
11733  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 217, __pyx_L1_error)
11734  (void)(computeGeometricInfo_edge((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
11735 
11736  /* "cmeshTools.pyx":218
11737  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11738  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11739  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
11740  * self.multilevelMesh.meshArray[i],
11741  * self.multilevelMesh.elementParentsArray[i],
11742  */
11743  __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 218, __pyx_L1_error)
11744  __Pyx_GOTREF(__pyx_t_5);
11745  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 218, __pyx_L1_error)
11746  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11747 
11748  /* "cmeshTools.pyx":219
11749  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11750  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11751  * self.multilevelMesh.meshArray[i], # <<<<<<<<<<<<<<
11752  * self.multilevelMesh.elementParentsArray[i],
11753  * 1);
11754  */
11755  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 219, __pyx_L1_error)
11756 
11757  /* "cmeshTools.pyx":220
11758  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11759  * self.multilevelMesh.meshArray[i],
11760  * self.multilevelMesh.elementParentsArray[i], # <<<<<<<<<<<<<<
11761  * 1);
11762  * elif cmesh.mesh.nNodes_element == 3:
11763  */
11764  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 220, __pyx_L1_error)
11765 
11766  /* "cmeshTools.pyx":218
11767  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11768  * cppm.computeGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11769  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
11770  * self.multilevelMesh.meshArray[i],
11771  * self.multilevelMesh.elementParentsArray[i],
11772  */
11773  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8]), (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_9]), (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_10]), 1));
11774 
11775  /* "cmeshTools.pyx":214
11776  * self.multilevelMesh,
11777  * False);
11778  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
11779  * cppm.constructElementBoundaryElementsArray_edge(self.multilevelMesh.meshArray[i]);
11780  * cppm.allocateGeometricInfo_edge(self.multilevelMesh.meshArray[i]);
11781  */
11782  }
11783  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11784 
11785  /* "cmeshTools.pyx":209
11786  * def __init__(self, CMesh cmesh, nLevels):
11787  * self.multilevelMesh = cppm.MultilevelMesh()
11788  * if cmesh.mesh.nNodes_element == 2: # <<<<<<<<<<<<<<
11789  * cppm.globallyRefineEdgeMesh(nLevels,
11790  * cmesh.mesh,
11791  */
11792  goto __pyx_L3;
11793  }
11794 
11795  /* "cmeshTools.pyx":222
11796  * self.multilevelMesh.elementParentsArray[i],
11797  * 1);
11798  * elif cmesh.mesh.nNodes_element == 3: # <<<<<<<<<<<<<<
11799  * cppm.globallyRefineTriangularMesh(nLevels,
11800  * cmesh.mesh,
11801  */
11802  __pyx_t_2 = ((__pyx_v_cmesh->mesh.nNodes_element == 3) != 0);
11803  if (__pyx_t_2) {
11804 
11805  /* "cmeshTools.pyx":223
11806  * 1);
11807  * elif cmesh.mesh.nNodes_element == 3:
11808  * cppm.globallyRefineTriangularMesh(nLevels, # <<<<<<<<<<<<<<
11809  * cmesh.mesh,
11810  * self.multilevelMesh,
11811  */
11812  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 223, __pyx_L1_error)
11813 
11814  /* "cmeshTools.pyx":226
11815  * cmesh.mesh,
11816  * self.multilevelMesh,
11817  * False); # <<<<<<<<<<<<<<
11818  * for i in range(1, nLevels):
11819  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]);
11820  */
11821  (void)(globallyRefineTriangularMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
11822 
11823  /* "cmeshTools.pyx":227
11824  * self.multilevelMesh,
11825  * False);
11826  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
11827  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]);
11828  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11829  */
11830  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 227, __pyx_L1_error)
11831  __Pyx_GOTREF(__pyx_t_4);
11832  __Pyx_INCREF(__pyx_int_1);
11833  __Pyx_GIVEREF(__pyx_int_1);
11834  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
11835  __Pyx_INCREF(__pyx_v_nLevels);
11836  __Pyx_GIVEREF(__pyx_v_nLevels);
11837  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nLevels);
11838  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 227, __pyx_L1_error)
11839  __Pyx_GOTREF(__pyx_t_5);
11840  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11841  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
11842  __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
11843  __pyx_t_7 = NULL;
11844  } else {
11845  __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 227, __pyx_L1_error)
11846  __Pyx_GOTREF(__pyx_t_4);
11847  __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 227, __pyx_L1_error)
11848  }
11849  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11850  for (;;) {
11851  if (likely(!__pyx_t_7)) {
11852  if (likely(PyList_CheckExact(__pyx_t_4))) {
11853  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
11854  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11855  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 227, __pyx_L1_error)
11856  #else
11857  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 227, __pyx_L1_error)
11858  __Pyx_GOTREF(__pyx_t_5);
11859  #endif
11860  } else {
11861  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
11862  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
11863  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 227, __pyx_L1_error)
11864  #else
11865  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 227, __pyx_L1_error)
11866  __Pyx_GOTREF(__pyx_t_5);
11867  #endif
11868  }
11869  } else {
11870  __pyx_t_5 = __pyx_t_7(__pyx_t_4);
11871  if (unlikely(!__pyx_t_5)) {
11872  PyObject* exc_type = PyErr_Occurred();
11873  if (exc_type) {
11874  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
11875  else __PYX_ERR(1, 227, __pyx_L1_error)
11876  }
11877  break;
11878  }
11879  __Pyx_GOTREF(__pyx_t_5);
11880  }
11881  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
11882  __pyx_t_5 = 0;
11883 
11884  /* "cmeshTools.pyx":228
11885  * False);
11886  * for i in range(1, nLevels):
11887  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
11888  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11889  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11890  */
11891  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 228, __pyx_L1_error)
11892  (void)(constructElementBoundaryElementsArray_triangle((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
11893 
11894  /* "cmeshTools.pyx":229
11895  * for i in range(1, nLevels):
11896  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]);
11897  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
11898  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11899  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11900  */
11901  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 229, __pyx_L1_error)
11902  (void)(allocateGeometricInfo_triangle((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
11903 
11904  /* "cmeshTools.pyx":230
11905  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]);
11906  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11907  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
11908  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11909  * self.multilevelMesh.meshArray[i],
11910  */
11911  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 230, __pyx_L1_error)
11912  (void)(computeGeometricInfo_triangle((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
11913 
11914  /* "cmeshTools.pyx":231
11915  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11916  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11917  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
11918  * self.multilevelMesh.meshArray[i],
11919  * self.multilevelMesh.elementParentsArray[i],
11920  */
11921  __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 231, __pyx_L1_error)
11922  __Pyx_GOTREF(__pyx_t_5);
11923  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 231, __pyx_L1_error)
11924  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
11925 
11926  /* "cmeshTools.pyx":232
11927  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11928  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11929  * self.multilevelMesh.meshArray[i], # <<<<<<<<<<<<<<
11930  * self.multilevelMesh.elementParentsArray[i],
11931  * 2);
11932  */
11933  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 232, __pyx_L1_error)
11934 
11935  /* "cmeshTools.pyx":233
11936  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
11937  * self.multilevelMesh.meshArray[i],
11938  * self.multilevelMesh.elementParentsArray[i], # <<<<<<<<<<<<<<
11939  * 2);
11940  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 2:
11941  */
11942  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 233, __pyx_L1_error)
11943 
11944  /* "cmeshTools.pyx":231
11945  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11946  * cppm.computeGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11947  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
11948  * self.multilevelMesh.meshArray[i],
11949  * self.multilevelMesh.elementParentsArray[i],
11950  */
11951  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10]), (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_9]), (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_8]), 2));
11952 
11953  /* "cmeshTools.pyx":227
11954  * self.multilevelMesh,
11955  * False);
11956  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
11957  * cppm.constructElementBoundaryElementsArray_triangle(self.multilevelMesh.meshArray[i]);
11958  * cppm.allocateGeometricInfo_triangle(self.multilevelMesh.meshArray[i]);
11959  */
11960  }
11961  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
11962 
11963  /* "cmeshTools.pyx":222
11964  * self.multilevelMesh.elementParentsArray[i],
11965  * 1);
11966  * elif cmesh.mesh.nNodes_element == 3: # <<<<<<<<<<<<<<
11967  * cppm.globallyRefineTriangularMesh(nLevels,
11968  * cmesh.mesh,
11969  */
11970  goto __pyx_L3;
11971  }
11972 
11973  /* "cmeshTools.pyx":235
11974  * self.multilevelMesh.elementParentsArray[i],
11975  * 2);
11976  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 2: # <<<<<<<<<<<<<<
11977  * cppm.globallyRefineQuadrilateralMesh(nLevels,
11978  * cmesh.mesh,
11979  */
11980  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_element == 4) != 0);
11981  if (__pyx_t_11) {
11982  } else {
11983  __pyx_t_2 = __pyx_t_11;
11984  goto __pyx_L8_bool_binop_done;
11985  }
11986  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_elementBoundary == 2) != 0);
11987  __pyx_t_2 = __pyx_t_11;
11988  __pyx_L8_bool_binop_done:;
11989  if (__pyx_t_2) {
11990 
11991  /* "cmeshTools.pyx":236
11992  * 2);
11993  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 2:
11994  * cppm.globallyRefineQuadrilateralMesh(nLevels, # <<<<<<<<<<<<<<
11995  * cmesh.mesh,
11996  * self.multilevelMesh,
11997  */
11998  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 236, __pyx_L1_error)
11999 
12000  /* "cmeshTools.pyx":239
12001  * cmesh.mesh,
12002  * self.multilevelMesh,
12003  * False); # <<<<<<<<<<<<<<
12004  * for i in range(1, nLevels):
12005  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]);
12006  */
12007  (void)(globallyRefineQuadrilateralMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
12008 
12009  /* "cmeshTools.pyx":240
12010  * self.multilevelMesh,
12011  * False);
12012  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12013  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]);
12014  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12015  */
12016  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 240, __pyx_L1_error)
12017  __Pyx_GOTREF(__pyx_t_4);
12018  __Pyx_INCREF(__pyx_int_1);
12019  __Pyx_GIVEREF(__pyx_int_1);
12020  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
12021  __Pyx_INCREF(__pyx_v_nLevels);
12022  __Pyx_GIVEREF(__pyx_v_nLevels);
12023  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nLevels);
12024  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 240, __pyx_L1_error)
12025  __Pyx_GOTREF(__pyx_t_5);
12026  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12027  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
12028  __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
12029  __pyx_t_7 = NULL;
12030  } else {
12031  __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 240, __pyx_L1_error)
12032  __Pyx_GOTREF(__pyx_t_4);
12033  __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 240, __pyx_L1_error)
12034  }
12035  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12036  for (;;) {
12037  if (likely(!__pyx_t_7)) {
12038  if (likely(PyList_CheckExact(__pyx_t_4))) {
12039  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
12040  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12041  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 240, __pyx_L1_error)
12042  #else
12043  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 240, __pyx_L1_error)
12044  __Pyx_GOTREF(__pyx_t_5);
12045  #endif
12046  } else {
12047  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
12048  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12049  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 240, __pyx_L1_error)
12050  #else
12051  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 240, __pyx_L1_error)
12052  __Pyx_GOTREF(__pyx_t_5);
12053  #endif
12054  }
12055  } else {
12056  __pyx_t_5 = __pyx_t_7(__pyx_t_4);
12057  if (unlikely(!__pyx_t_5)) {
12058  PyObject* exc_type = PyErr_Occurred();
12059  if (exc_type) {
12060  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12061  else __PYX_ERR(1, 240, __pyx_L1_error)
12062  }
12063  break;
12064  }
12065  __Pyx_GOTREF(__pyx_t_5);
12066  }
12067  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
12068  __pyx_t_5 = 0;
12069 
12070  /* "cmeshTools.pyx":241
12071  * False);
12072  * for i in range(1, nLevels):
12073  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12074  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12075  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12076  */
12077  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 241, __pyx_L1_error)
12078  (void)(constructElementBoundaryElementsArray_quadrilateral((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12079 
12080  /* "cmeshTools.pyx":242
12081  * for i in range(1, nLevels):
12082  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]);
12083  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12084  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12085  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12086  */
12087  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 242, __pyx_L1_error)
12088  (void)(allocateGeometricInfo_quadrilateral((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12089 
12090  /* "cmeshTools.pyx":243
12091  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]);
12092  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12093  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12094  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12095  * self.multilevelMesh.meshArray[i],
12096  */
12097  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 243, __pyx_L1_error)
12098  (void)(computeGeometricInfo_quadrilateral((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12099 
12100  /* "cmeshTools.pyx":244
12101  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12102  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12103  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12104  * self.multilevelMesh.meshArray[i],
12105  * self.multilevelMesh.elementParentsArray[i],
12106  */
12107  __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 244, __pyx_L1_error)
12108  __Pyx_GOTREF(__pyx_t_5);
12109  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 244, __pyx_L1_error)
12110  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12111 
12112  /* "cmeshTools.pyx":245
12113  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12114  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12115  * self.multilevelMesh.meshArray[i], # <<<<<<<<<<<<<<
12116  * self.multilevelMesh.elementParentsArray[i],
12117  * 2);
12118  */
12119  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 245, __pyx_L1_error)
12120 
12121  /* "cmeshTools.pyx":246
12122  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12123  * self.multilevelMesh.meshArray[i],
12124  * self.multilevelMesh.elementParentsArray[i], # <<<<<<<<<<<<<<
12125  * 2);
12126  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 3:
12127  */
12128  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 246, __pyx_L1_error)
12129 
12130  /* "cmeshTools.pyx":244
12131  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12132  * cppm.computeGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12133  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12134  * self.multilevelMesh.meshArray[i],
12135  * self.multilevelMesh.elementParentsArray[i],
12136  */
12137  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8]), (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_9]), (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_10]), 2));
12138 
12139  /* "cmeshTools.pyx":240
12140  * self.multilevelMesh,
12141  * False);
12142  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12143  * cppm.constructElementBoundaryElementsArray_quadrilateral(self.multilevelMesh.meshArray[i]);
12144  * cppm.allocateGeometricInfo_quadrilateral(self.multilevelMesh.meshArray[i]);
12145  */
12146  }
12147  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12148 
12149  /* "cmeshTools.pyx":235
12150  * self.multilevelMesh.elementParentsArray[i],
12151  * 2);
12152  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 2: # <<<<<<<<<<<<<<
12153  * cppm.globallyRefineQuadrilateralMesh(nLevels,
12154  * cmesh.mesh,
12155  */
12156  goto __pyx_L3;
12157  }
12158 
12159  /* "cmeshTools.pyx":248
12160  * self.multilevelMesh.elementParentsArray[i],
12161  * 2);
12162  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 3: # <<<<<<<<<<<<<<
12163  * cppm.globallyRefineTetrahedralMesh(nLevels,
12164  * cmesh.mesh,
12165  */
12166  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_element == 4) != 0);
12167  if (__pyx_t_11) {
12168  } else {
12169  __pyx_t_2 = __pyx_t_11;
12170  goto __pyx_L12_bool_binop_done;
12171  }
12172  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_elementBoundary == 3) != 0);
12173  __pyx_t_2 = __pyx_t_11;
12174  __pyx_L12_bool_binop_done:;
12175  if (__pyx_t_2) {
12176 
12177  /* "cmeshTools.pyx":249
12178  * 2);
12179  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 3:
12180  * cppm.globallyRefineTetrahedralMesh(nLevels, # <<<<<<<<<<<<<<
12181  * cmesh.mesh,
12182  * self.multilevelMesh,
12183  */
12184  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 249, __pyx_L1_error)
12185 
12186  /* "cmeshTools.pyx":252
12187  * cmesh.mesh,
12188  * self.multilevelMesh,
12189  * False); # <<<<<<<<<<<<<<
12190  * for i in range(1, nLevels):
12191  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]);
12192  */
12193  (void)(globallyRefineTetrahedralMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
12194 
12195  /* "cmeshTools.pyx":253
12196  * self.multilevelMesh,
12197  * False);
12198  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12199  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]);
12200  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12201  */
12202  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 253, __pyx_L1_error)
12203  __Pyx_GOTREF(__pyx_t_4);
12204  __Pyx_INCREF(__pyx_int_1);
12205  __Pyx_GIVEREF(__pyx_int_1);
12206  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
12207  __Pyx_INCREF(__pyx_v_nLevels);
12208  __Pyx_GIVEREF(__pyx_v_nLevels);
12209  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nLevels);
12210  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 253, __pyx_L1_error)
12211  __Pyx_GOTREF(__pyx_t_5);
12212  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12213  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
12214  __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
12215  __pyx_t_7 = NULL;
12216  } else {
12217  __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 253, __pyx_L1_error)
12218  __Pyx_GOTREF(__pyx_t_4);
12219  __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 253, __pyx_L1_error)
12220  }
12221  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12222  for (;;) {
12223  if (likely(!__pyx_t_7)) {
12224  if (likely(PyList_CheckExact(__pyx_t_4))) {
12225  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
12226  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12227  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 253, __pyx_L1_error)
12228  #else
12229  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 253, __pyx_L1_error)
12230  __Pyx_GOTREF(__pyx_t_5);
12231  #endif
12232  } else {
12233  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
12234  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12235  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 253, __pyx_L1_error)
12236  #else
12237  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 253, __pyx_L1_error)
12238  __Pyx_GOTREF(__pyx_t_5);
12239  #endif
12240  }
12241  } else {
12242  __pyx_t_5 = __pyx_t_7(__pyx_t_4);
12243  if (unlikely(!__pyx_t_5)) {
12244  PyObject* exc_type = PyErr_Occurred();
12245  if (exc_type) {
12246  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12247  else __PYX_ERR(1, 253, __pyx_L1_error)
12248  }
12249  break;
12250  }
12251  __Pyx_GOTREF(__pyx_t_5);
12252  }
12253  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
12254  __pyx_t_5 = 0;
12255 
12256  /* "cmeshTools.pyx":254
12257  * False);
12258  * for i in range(1, nLevels):
12259  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12260  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12261  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12262  */
12263  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 254, __pyx_L1_error)
12264  (void)(constructElementBoundaryElementsArray_tetrahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
12265 
12266  /* "cmeshTools.pyx":255
12267  * for i in range(1, nLevels):
12268  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]);
12269  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12270  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12271  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12272  */
12273  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 255, __pyx_L1_error)
12274  (void)(allocateGeometricInfo_tetrahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
12275 
12276  /* "cmeshTools.pyx":256
12277  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]);
12278  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12279  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12280  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12281  * self.multilevelMesh.meshArray[i],
12282  */
12283  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 256, __pyx_L1_error)
12284  (void)(computeGeometricInfo_tetrahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10])));
12285 
12286  /* "cmeshTools.pyx":257
12287  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12288  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12289  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12290  * self.multilevelMesh.meshArray[i],
12291  * self.multilevelMesh.elementParentsArray[i],
12292  */
12293  __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 257, __pyx_L1_error)
12294  __Pyx_GOTREF(__pyx_t_5);
12295  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 257, __pyx_L1_error)
12296  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12297 
12298  /* "cmeshTools.pyx":258
12299  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12300  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12301  * self.multilevelMesh.meshArray[i], # <<<<<<<<<<<<<<
12302  * self.multilevelMesh.elementParentsArray[i],
12303  * 3);
12304  */
12305  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 258, __pyx_L1_error)
12306 
12307  /* "cmeshTools.pyx":259
12308  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12309  * self.multilevelMesh.meshArray[i],
12310  * self.multilevelMesh.elementParentsArray[i], # <<<<<<<<<<<<<<
12311  * 3);
12312  * elif cmesh.mesh.nNodes_element == 8 and cmesh.mesh.nNodes_elementBoundary == 4:
12313  */
12314  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 259, __pyx_L1_error)
12315 
12316  /* "cmeshTools.pyx":257
12317  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12318  * cppm.computeGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12319  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12320  * self.multilevelMesh.meshArray[i],
12321  * self.multilevelMesh.elementParentsArray[i],
12322  */
12323  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_10]), (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_9]), (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_8]), 3));
12324 
12325  /* "cmeshTools.pyx":253
12326  * self.multilevelMesh,
12327  * False);
12328  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12329  * cppm.constructElementBoundaryElementsArray_tetrahedron(self.multilevelMesh.meshArray[i]);
12330  * cppm.allocateGeometricInfo_tetrahedron(self.multilevelMesh.meshArray[i]);
12331  */
12332  }
12333  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12334 
12335  /* "cmeshTools.pyx":248
12336  * self.multilevelMesh.elementParentsArray[i],
12337  * 2);
12338  * elif cmesh.mesh.nNodes_element == 4 and cmesh.mesh.nNodes_elementBoundary == 3: # <<<<<<<<<<<<<<
12339  * cppm.globallyRefineTetrahedralMesh(nLevels,
12340  * cmesh.mesh,
12341  */
12342  goto __pyx_L3;
12343  }
12344 
12345  /* "cmeshTools.pyx":261
12346  * self.multilevelMesh.elementParentsArray[i],
12347  * 3);
12348  * elif cmesh.mesh.nNodes_element == 8 and cmesh.mesh.nNodes_elementBoundary == 4: # <<<<<<<<<<<<<<
12349  * cppm.globallyRefineHexahedralMesh(nLevels,
12350  * cmesh.mesh,
12351  */
12352  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_element == 8) != 0);
12353  if (__pyx_t_11) {
12354  } else {
12355  __pyx_t_2 = __pyx_t_11;
12356  goto __pyx_L16_bool_binop_done;
12357  }
12358  __pyx_t_11 = ((__pyx_v_cmesh->mesh.nNodes_elementBoundary == 4) != 0);
12359  __pyx_t_2 = __pyx_t_11;
12360  __pyx_L16_bool_binop_done:;
12361  if (__pyx_t_2) {
12362 
12363  /* "cmeshTools.pyx":262
12364  * 3);
12365  * elif cmesh.mesh.nNodes_element == 8 and cmesh.mesh.nNodes_elementBoundary == 4:
12366  * cppm.globallyRefineHexahedralMesh(nLevels, # <<<<<<<<<<<<<<
12367  * cmesh.mesh,
12368  * self.multilevelMesh,
12369  */
12370  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 262, __pyx_L1_error)
12371 
12372  /* "cmeshTools.pyx":265
12373  * cmesh.mesh,
12374  * self.multilevelMesh,
12375  * False); # <<<<<<<<<<<<<<
12376  * for i in range(1, nLevels):
12377  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh.
12378  */
12379  (void)(globallyRefineHexahedralMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
12380 
12381  /* "cmeshTools.pyx":266
12382  * self.multilevelMesh,
12383  * False);
12384  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12385  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh.
12386  * meshArray[i]);
12387  */
12388  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 266, __pyx_L1_error)
12389  __Pyx_GOTREF(__pyx_t_4);
12390  __Pyx_INCREF(__pyx_int_1);
12391  __Pyx_GIVEREF(__pyx_int_1);
12392  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_int_1);
12393  __Pyx_INCREF(__pyx_v_nLevels);
12394  __Pyx_GIVEREF(__pyx_v_nLevels);
12395  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_nLevels);
12396  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 266, __pyx_L1_error)
12397  __Pyx_GOTREF(__pyx_t_5);
12398  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12399  if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
12400  __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
12401  __pyx_t_7 = NULL;
12402  } else {
12403  __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 266, __pyx_L1_error)
12404  __Pyx_GOTREF(__pyx_t_4);
12405  __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 266, __pyx_L1_error)
12406  }
12407  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12408  for (;;) {
12409  if (likely(!__pyx_t_7)) {
12410  if (likely(PyList_CheckExact(__pyx_t_4))) {
12411  if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
12412  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12413  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 266, __pyx_L1_error)
12414  #else
12415  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 266, __pyx_L1_error)
12416  __Pyx_GOTREF(__pyx_t_5);
12417  #endif
12418  } else {
12419  if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
12420  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12421  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 266, __pyx_L1_error)
12422  #else
12423  __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 266, __pyx_L1_error)
12424  __Pyx_GOTREF(__pyx_t_5);
12425  #endif
12426  }
12427  } else {
12428  __pyx_t_5 = __pyx_t_7(__pyx_t_4);
12429  if (unlikely(!__pyx_t_5)) {
12430  PyObject* exc_type = PyErr_Occurred();
12431  if (exc_type) {
12432  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12433  else __PYX_ERR(1, 266, __pyx_L1_error)
12434  }
12435  break;
12436  }
12437  __Pyx_GOTREF(__pyx_t_5);
12438  }
12439  __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_5);
12440  __pyx_t_5 = 0;
12441 
12442  /* "cmeshTools.pyx":268
12443  * for i in range(1, nLevels):
12444  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh.
12445  * meshArray[i]); # <<<<<<<<<<<<<<
12446  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12447  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12448  */
12449  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 268, __pyx_L1_error)
12450 
12451  /* "cmeshTools.pyx":267
12452  * False);
12453  * for i in range(1, nLevels):
12454  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh. # <<<<<<<<<<<<<<
12455  * meshArray[i]);
12456  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12457  */
12458  (void)(constructElementBoundaryElementsArray_hexahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12459 
12460  /* "cmeshTools.pyx":269
12461  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh.
12462  * meshArray[i]);
12463  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12464  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12465  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12466  */
12467  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 269, __pyx_L1_error)
12468  (void)(allocateGeometricInfo_hexahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12469 
12470  /* "cmeshTools.pyx":270
12471  * meshArray[i]);
12472  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12473  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]); # <<<<<<<<<<<<<<
12474  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12475  * self.multilevelMesh.meshArray[i],
12476  */
12477  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 270, __pyx_L1_error)
12478  (void)(computeGeometricInfo_hexahedron((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8])));
12479 
12480  /* "cmeshTools.pyx":271
12481  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12482  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12483  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12484  * self.multilevelMesh.meshArray[i],
12485  * self.multilevelMesh.elementParentsArray[i],
12486  */
12487  __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 271, __pyx_L1_error)
12488  __Pyx_GOTREF(__pyx_t_5);
12489  __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 271, __pyx_L1_error)
12490  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
12491 
12492  /* "cmeshTools.pyx":272
12493  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12494  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12495  * self.multilevelMesh.meshArray[i], # <<<<<<<<<<<<<<
12496  * self.multilevelMesh.elementParentsArray[i],
12497  * 4);
12498  */
12499  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 272, __pyx_L1_error)
12500 
12501  /* "cmeshTools.pyx":273
12502  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1],
12503  * self.multilevelMesh.meshArray[i],
12504  * self.multilevelMesh.elementParentsArray[i], # <<<<<<<<<<<<<<
12505  * 4);
12506  * else:
12507  */
12508  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 273, __pyx_L1_error)
12509 
12510  /* "cmeshTools.pyx":271
12511  * cppm.allocateGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12512  * cppm.computeGeometricInfo_hexahedron(self.multilevelMesh.meshArray[i]);
12513  * cppm.assignElementBoundaryMaterialTypesFromParent(self.multilevelMesh.meshArray[i-1], # <<<<<<<<<<<<<<
12514  * self.multilevelMesh.meshArray[i],
12515  * self.multilevelMesh.elementParentsArray[i],
12516  */
12517  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_8]), (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_9]), (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_10]), 4));
12518 
12519  /* "cmeshTools.pyx":266
12520  * self.multilevelMesh,
12521  * False);
12522  * for i in range(1, nLevels): # <<<<<<<<<<<<<<
12523  * cppm.constructElementBoundaryElementsArray_hexahedron(self.multilevelMesh.
12524  * meshArray[i]);
12525  */
12526  }
12527  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12528 
12529  /* "cmeshTools.pyx":261
12530  * self.multilevelMesh.elementParentsArray[i],
12531  * 3);
12532  * elif cmesh.mesh.nNodes_element == 8 and cmesh.mesh.nNodes_elementBoundary == 4: # <<<<<<<<<<<<<<
12533  * cppm.globallyRefineHexahedralMesh(nLevels,
12534  * cmesh.mesh,
12535  */
12536  goto __pyx_L3;
12537  }
12538 
12539  /* "cmeshTools.pyx":276
12540  * 4);
12541  * else:
12542  * assert nLevels == 1, 'wrong nLevels' # <<<<<<<<<<<<<<
12543  * cppm.globallyRefineTetrahedralMesh(nLevels,
12544  * cmesh.mesh,
12545  */
12546  /*else*/ {
12547  #ifndef CYTHON_WITHOUT_ASSERTIONS
12548  if (unlikely(!Py_OptimizeFlag)) {
12549  __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_v_nLevels, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 276, __pyx_L1_error)
12550  __Pyx_GOTREF(__pyx_t_4);
12551  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 276, __pyx_L1_error)
12552  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
12553  if (unlikely(!__pyx_t_2)) {
12554  PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_wrong_nLevels);
12555  __PYX_ERR(1, 276, __pyx_L1_error)
12556  }
12557  }
12558  #endif
12559 
12560  /* "cmeshTools.pyx":277
12561  * else:
12562  * assert nLevels == 1, 'wrong nLevels'
12563  * cppm.globallyRefineTetrahedralMesh(nLevels, # <<<<<<<<<<<<<<
12564  * cmesh.mesh,
12565  * self.multilevelMesh,
12566  */
12567  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_v_nLevels); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 277, __pyx_L1_error)
12568 
12569  /* "cmeshTools.pyx":280
12570  * cmesh.mesh,
12571  * self.multilevelMesh,
12572  * False); # <<<<<<<<<<<<<<
12573  *
12574  * def buildPythonMultilevelMeshInterface(self):
12575  */
12576  (void)(globallyRefineTetrahedralMesh(__pyx_t_3, __pyx_v_cmesh->mesh, __pyx_v_self->multilevelMesh, 0));
12577  }
12578  __pyx_L3:;
12579 
12580  /* "cmeshTools.pyx":207
12581  * list elementChildrenArrayList
12582  * list elementChildrenOffsetsList
12583  * def __init__(self, CMesh cmesh, nLevels): # <<<<<<<<<<<<<<
12584  * self.multilevelMesh = cppm.MultilevelMesh()
12585  * if cmesh.mesh.nNodes_element == 2:
12586  */
12587 
12588  /* function exit code */
12589  __pyx_r = 0;
12590  goto __pyx_L0;
12591  __pyx_L1_error:;
12592  __Pyx_XDECREF(__pyx_t_4);
12593  __Pyx_XDECREF(__pyx_t_5);
12594  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
12595  __pyx_r = -1;
12596  __pyx_L0:;
12597  __Pyx_XDECREF(__pyx_v_i);
12598  __Pyx_RefNannyFinishContext();
12599  return __pyx_r;
12600 }
12601 
12602 /* "cmeshTools.pyx":282
12603  * False);
12604  *
12605  * def buildPythonMultilevelMeshInterface(self): # <<<<<<<<<<<<<<
12606  * cdef int dim
12607  * self.cmeshList = [CMesh_FromMesh(self.multilevelMesh.meshArray[0])]
12608  */
12609 
12610 /* Python wrapper */
12611 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_3buildPythonMultilevelMeshInterface(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
12612 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_3buildPythonMultilevelMeshInterface(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
12613  PyObject *__pyx_r = 0;
12614  __Pyx_RefNannyDeclarations
12615  __Pyx_RefNannySetupContext("buildPythonMultilevelMeshInterface (wrapper)", 0);
12616  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_2buildPythonMultilevelMeshInterface(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
12617 
12618  /* function exit code */
12619  __Pyx_RefNannyFinishContext();
12620  return __pyx_r;
12621 }
12622 
12623 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_2buildPythonMultilevelMeshInterface(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
12624  CYTHON_UNUSED int __pyx_v_dim;
12625  PyObject *__pyx_v_n = NULL;
12626  PyObject *__pyx_r = NULL;
12627  __Pyx_RefNannyDeclarations
12628  PyObject *__pyx_t_1 = NULL;
12629  PyObject *__pyx_t_2 = NULL;
12630  PyObject *__pyx_t_3 = NULL;
12631  Py_ssize_t __pyx_t_4;
12632  PyObject *(*__pyx_t_5)(PyObject *);
12633  Py_ssize_t __pyx_t_6;
12634  int __pyx_t_7;
12635  PyObject *__pyx_t_8 = NULL;
12636  int *__pyx_t_9;
12637  struct __pyx_array_obj *__pyx_t_10 = NULL;
12638  PyObject *__pyx_t_11 = NULL;
12639  Py_ssize_t __pyx_t_12;
12640  __Pyx_RefNannySetupContext("buildPythonMultilevelMeshInterface", 0);
12641 
12642  /* "cmeshTools.pyx":284
12643  * def buildPythonMultilevelMeshInterface(self):
12644  * cdef int dim
12645  * self.cmeshList = [CMesh_FromMesh(self.multilevelMesh.meshArray[0])] # <<<<<<<<<<<<<<
12646  * self.elementParentsArrayList = [np.zeros(0)]
12647  * self.elementChildrenArrayList = []
12648  */
12649  __pyx_t_1 = ((PyObject *)__pyx_f_10cmeshTools_CMesh_FromMesh((__pyx_v_self->multilevelMesh.meshArray[0]))); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 284, __pyx_L1_error)
12650  __Pyx_GOTREF(__pyx_t_1);
12651  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 284, __pyx_L1_error)
12652  __Pyx_GOTREF(__pyx_t_2);
12653  __Pyx_GIVEREF(__pyx_t_1);
12654  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
12655  __pyx_t_1 = 0;
12656  __Pyx_GIVEREF(__pyx_t_2);
12657  __Pyx_GOTREF(__pyx_v_self->cmeshList);
12658  __Pyx_DECREF(__pyx_v_self->cmeshList);
12659  __pyx_v_self->cmeshList = ((PyObject*)__pyx_t_2);
12660  __pyx_t_2 = 0;
12661 
12662  /* "cmeshTools.pyx":285
12663  * cdef int dim
12664  * self.cmeshList = [CMesh_FromMesh(self.multilevelMesh.meshArray[0])]
12665  * self.elementParentsArrayList = [np.zeros(0)] # <<<<<<<<<<<<<<
12666  * self.elementChildrenArrayList = []
12667  * self.elementChildrenOffsetsList = []
12668  */
12669  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 285, __pyx_L1_error)
12670  __Pyx_GOTREF(__pyx_t_1);
12671  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error)
12672  __Pyx_GOTREF(__pyx_t_3);
12673  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12674  __pyx_t_1 = NULL;
12675  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
12676  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
12677  if (likely(__pyx_t_1)) {
12678  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
12679  __Pyx_INCREF(__pyx_t_1);
12680  __Pyx_INCREF(function);
12681  __Pyx_DECREF_SET(__pyx_t_3, function);
12682  }
12683  }
12684  __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_1, __pyx_int_0) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_0);
12685  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12686  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 285, __pyx_L1_error)
12687  __Pyx_GOTREF(__pyx_t_2);
12688  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12689  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 285, __pyx_L1_error)
12690  __Pyx_GOTREF(__pyx_t_3);
12691  __Pyx_GIVEREF(__pyx_t_2);
12692  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
12693  __pyx_t_2 = 0;
12694  __Pyx_GIVEREF(__pyx_t_3);
12695  __Pyx_GOTREF(__pyx_v_self->elementParentsArrayList);
12696  __Pyx_DECREF(__pyx_v_self->elementParentsArrayList);
12697  __pyx_v_self->elementParentsArrayList = ((PyObject*)__pyx_t_3);
12698  __pyx_t_3 = 0;
12699 
12700  /* "cmeshTools.pyx":286
12701  * self.cmeshList = [CMesh_FromMesh(self.multilevelMesh.meshArray[0])]
12702  * self.elementParentsArrayList = [np.zeros(0)]
12703  * self.elementChildrenArrayList = [] # <<<<<<<<<<<<<<
12704  * self.elementChildrenOffsetsList = []
12705  * for n in range(1, self.multilevelMesh.nLevels):
12706  */
12707  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 286, __pyx_L1_error)
12708  __Pyx_GOTREF(__pyx_t_3);
12709  __Pyx_GIVEREF(__pyx_t_3);
12710  __Pyx_GOTREF(__pyx_v_self->elementChildrenArrayList);
12711  __Pyx_DECREF(__pyx_v_self->elementChildrenArrayList);
12712  __pyx_v_self->elementChildrenArrayList = ((PyObject*)__pyx_t_3);
12713  __pyx_t_3 = 0;
12714 
12715  /* "cmeshTools.pyx":287
12716  * self.elementParentsArrayList = [np.zeros(0)]
12717  * self.elementChildrenArrayList = []
12718  * self.elementChildrenOffsetsList = [] # <<<<<<<<<<<<<<
12719  * for n in range(1, self.multilevelMesh.nLevels):
12720  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])]
12721  */
12722  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 287, __pyx_L1_error)
12723  __Pyx_GOTREF(__pyx_t_3);
12724  __Pyx_GIVEREF(__pyx_t_3);
12725  __Pyx_GOTREF(__pyx_v_self->elementChildrenOffsetsList);
12726  __Pyx_DECREF(__pyx_v_self->elementChildrenOffsetsList);
12727  __pyx_v_self->elementChildrenOffsetsList = ((PyObject*)__pyx_t_3);
12728  __pyx_t_3 = 0;
12729 
12730  /* "cmeshTools.pyx":288
12731  * self.elementChildrenArrayList = []
12732  * self.elementChildrenOffsetsList = []
12733  * for n in range(1, self.multilevelMesh.nLevels): # <<<<<<<<<<<<<<
12734  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])]
12735  * dim = self.multilevelMesh.meshArray[n].nElements_global
12736  */
12737  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->multilevelMesh.nLevels); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 288, __pyx_L1_error)
12738  __Pyx_GOTREF(__pyx_t_3);
12739  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 288, __pyx_L1_error)
12740  __Pyx_GOTREF(__pyx_t_2);
12741  __Pyx_INCREF(__pyx_int_1);
12742  __Pyx_GIVEREF(__pyx_int_1);
12743  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
12744  __Pyx_GIVEREF(__pyx_t_3);
12745  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
12746  __pyx_t_3 = 0;
12747  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 288, __pyx_L1_error)
12748  __Pyx_GOTREF(__pyx_t_3);
12749  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
12750  if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
12751  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
12752  __pyx_t_5 = NULL;
12753  } else {
12754  __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 288, __pyx_L1_error)
12755  __Pyx_GOTREF(__pyx_t_2);
12756  __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 288, __pyx_L1_error)
12757  }
12758  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12759  for (;;) {
12760  if (likely(!__pyx_t_5)) {
12761  if (likely(PyList_CheckExact(__pyx_t_2))) {
12762  if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
12763  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12764  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 288, __pyx_L1_error)
12765  #else
12766  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 288, __pyx_L1_error)
12767  __Pyx_GOTREF(__pyx_t_3);
12768  #endif
12769  } else {
12770  if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
12771  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
12772  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(1, 288, __pyx_L1_error)
12773  #else
12774  __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 288, __pyx_L1_error)
12775  __Pyx_GOTREF(__pyx_t_3);
12776  #endif
12777  }
12778  } else {
12779  __pyx_t_3 = __pyx_t_5(__pyx_t_2);
12780  if (unlikely(!__pyx_t_3)) {
12781  PyObject* exc_type = PyErr_Occurred();
12782  if (exc_type) {
12783  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
12784  else __PYX_ERR(1, 288, __pyx_L1_error)
12785  }
12786  break;
12787  }
12788  __Pyx_GOTREF(__pyx_t_3);
12789  }
12790  __Pyx_XDECREF_SET(__pyx_v_n, __pyx_t_3);
12791  __pyx_t_3 = 0;
12792 
12793  /* "cmeshTools.pyx":289
12794  * self.elementChildrenOffsetsList = []
12795  * for n in range(1, self.multilevelMesh.nLevels):
12796  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])] # <<<<<<<<<<<<<<
12797  * dim = self.multilevelMesh.meshArray[n].nElements_global
12798  * self.elementParentsArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementParentsArray[n])]
12799  */
12800  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 289, __pyx_L1_error)
12801  __pyx_t_3 = ((PyObject *)__pyx_f_10cmeshTools_CMesh_FromMesh((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_6]))); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 289, __pyx_L1_error)
12802  __Pyx_GOTREF(__pyx_t_3);
12803  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 289, __pyx_L1_error)
12804  __Pyx_GOTREF(__pyx_t_1);
12805  __Pyx_GIVEREF(__pyx_t_3);
12806  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
12807  __pyx_t_3 = 0;
12808  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_self->cmeshList, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 289, __pyx_L1_error)
12809  __Pyx_GOTREF(__pyx_t_3);
12810  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12811  __Pyx_GIVEREF(__pyx_t_3);
12812  __Pyx_GOTREF(__pyx_v_self->cmeshList);
12813  __Pyx_DECREF(__pyx_v_self->cmeshList);
12814  __pyx_v_self->cmeshList = ((PyObject*)__pyx_t_3);
12815  __pyx_t_3 = 0;
12816 
12817  /* "cmeshTools.pyx":290
12818  * for n in range(1, self.multilevelMesh.nLevels):
12819  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])]
12820  * dim = self.multilevelMesh.meshArray[n].nElements_global # <<<<<<<<<<<<<<
12821  * self.elementParentsArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementParentsArray[n])]
12822  * dim = self.multilevelMesh.elementChildrenOffsets[n-1][self.multilevelMesh.meshArray[n-1].nElements_global]
12823  */
12824  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 290, __pyx_L1_error)
12825  __pyx_t_7 = (__pyx_v_self->multilevelMesh.meshArray[__pyx_t_6]).nElements_global;
12826  __pyx_v_dim = __pyx_t_7;
12827 
12828  /* "cmeshTools.pyx":291
12829  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])]
12830  * dim = self.multilevelMesh.meshArray[n].nElements_global
12831  * self.elementParentsArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementParentsArray[n])] # <<<<<<<<<<<<<<
12832  * dim = self.multilevelMesh.elementChildrenOffsets[n-1][self.multilevelMesh.meshArray[n-1].nElements_global]
12833  * self.elementChildrenArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenArray[n-1])]
12834  */
12835  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 291, __pyx_L1_error)
12836  __Pyx_GOTREF(__pyx_t_1);
12837  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_asarray); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 291, __pyx_L1_error)
12838  __Pyx_GOTREF(__pyx_t_8);
12839  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12840  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_n); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 291, __pyx_L1_error)
12841  __pyx_t_9 = (__pyx_v_self->multilevelMesh.elementParentsArray[__pyx_t_6]);
12842  if (!__pyx_t_9) {
12843  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
12844  __PYX_ERR(1, 291, __pyx_L1_error)
12845  }
12846  __pyx_t_11 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
12847  __pyx_t_1 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_dim));
12848  if (unlikely(!__pyx_t_11 || !__pyx_t_1 || !PyBytes_AsString(__pyx_t_11))) __PYX_ERR(1, 291, __pyx_L1_error)
12849  __Pyx_GOTREF(__pyx_t_11);
12850  __Pyx_GOTREF(__pyx_t_1);
12851  __pyx_t_10 = __pyx_array_new(__pyx_t_1, sizeof(int), PyBytes_AS_STRING(__pyx_t_11), (char *) "c", (char *) __pyx_t_9);
12852  if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 291, __pyx_L1_error)
12853  __Pyx_GOTREF(__pyx_t_10);
12854  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12855  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12856  __pyx_t_11 = NULL;
12857  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
12858  __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
12859  if (likely(__pyx_t_11)) {
12860  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
12861  __Pyx_INCREF(__pyx_t_11);
12862  __Pyx_INCREF(function);
12863  __Pyx_DECREF_SET(__pyx_t_8, function);
12864  }
12865  }
12866  __pyx_t_3 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_11, ((PyObject *)__pyx_t_10)) : __Pyx_PyObject_CallOneArg(__pyx_t_8, ((PyObject *)__pyx_t_10));
12867  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
12868  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
12869  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 291, __pyx_L1_error)
12870  __Pyx_GOTREF(__pyx_t_3);
12871  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12872  __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 291, __pyx_L1_error)
12873  __Pyx_GOTREF(__pyx_t_8);
12874  __Pyx_GIVEREF(__pyx_t_3);
12875  PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
12876  __pyx_t_3 = 0;
12877  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_self->elementParentsArrayList, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 291, __pyx_L1_error)
12878  __Pyx_GOTREF(__pyx_t_3);
12879  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12880  __Pyx_GIVEREF(__pyx_t_3);
12881  __Pyx_GOTREF(__pyx_v_self->elementParentsArrayList);
12882  __Pyx_DECREF(__pyx_v_self->elementParentsArrayList);
12883  __pyx_v_self->elementParentsArrayList = ((PyObject*)__pyx_t_3);
12884  __pyx_t_3 = 0;
12885 
12886  /* "cmeshTools.pyx":292
12887  * dim = self.multilevelMesh.meshArray[n].nElements_global
12888  * self.elementParentsArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementParentsArray[n])]
12889  * dim = self.multilevelMesh.elementChildrenOffsets[n-1][self.multilevelMesh.meshArray[n-1].nElements_global] # <<<<<<<<<<<<<<
12890  * self.elementChildrenArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenArray[n-1])]
12891  * dim = self.multilevelMesh.meshArray[n-1].nElements_global+1;
12892  */
12893  __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 292, __pyx_L1_error)
12894  __Pyx_GOTREF(__pyx_t_3);
12895  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 292, __pyx_L1_error)
12896  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12897  __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 292, __pyx_L1_error)
12898  __Pyx_GOTREF(__pyx_t_3);
12899  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 292, __pyx_L1_error)
12900  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12901  __pyx_v_dim = ((__pyx_v_self->multilevelMesh.elementChildrenOffsets[__pyx_t_6])[(__pyx_v_self->multilevelMesh.meshArray[__pyx_t_12]).nElements_global]);
12902 
12903  /* "cmeshTools.pyx":293
12904  * self.elementParentsArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementParentsArray[n])]
12905  * dim = self.multilevelMesh.elementChildrenOffsets[n-1][self.multilevelMesh.meshArray[n-1].nElements_global]
12906  * self.elementChildrenArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenArray[n-1])] # <<<<<<<<<<<<<<
12907  * dim = self.multilevelMesh.meshArray[n-1].nElements_global+1;
12908  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
12909  */
12910  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 293, __pyx_L1_error)
12911  __Pyx_GOTREF(__pyx_t_8);
12912  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_asarray); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 293, __pyx_L1_error)
12913  __Pyx_GOTREF(__pyx_t_11);
12914  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12915  __pyx_t_8 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 293, __pyx_L1_error)
12916  __Pyx_GOTREF(__pyx_t_8);
12917  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 293, __pyx_L1_error)
12918  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12919  __pyx_t_9 = (__pyx_v_self->multilevelMesh.elementChildrenArray[__pyx_t_12]);
12920  if (!__pyx_t_9) {
12921  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
12922  __PYX_ERR(1, 293, __pyx_L1_error)
12923  }
12924  __pyx_t_1 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
12925  __pyx_t_8 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_dim));
12926  if (unlikely(!__pyx_t_1 || !__pyx_t_8 || !PyBytes_AsString(__pyx_t_1))) __PYX_ERR(1, 293, __pyx_L1_error)
12927  __Pyx_GOTREF(__pyx_t_1);
12928  __Pyx_GOTREF(__pyx_t_8);
12929  __pyx_t_10 = __pyx_array_new(__pyx_t_8, sizeof(int), PyBytes_AS_STRING(__pyx_t_1), (char *) "c", (char *) __pyx_t_9);
12930  if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 293, __pyx_L1_error)
12931  __Pyx_GOTREF(__pyx_t_10);
12932  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
12933  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
12934  __pyx_t_1 = NULL;
12935  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
12936  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_11);
12937  if (likely(__pyx_t_1)) {
12938  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
12939  __Pyx_INCREF(__pyx_t_1);
12940  __Pyx_INCREF(function);
12941  __Pyx_DECREF_SET(__pyx_t_11, function);
12942  }
12943  }
12944  __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_1, ((PyObject *)__pyx_t_10)) : __Pyx_PyObject_CallOneArg(__pyx_t_11, ((PyObject *)__pyx_t_10));
12945  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
12946  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
12947  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 293, __pyx_L1_error)
12948  __Pyx_GOTREF(__pyx_t_3);
12949  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12950  __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 293, __pyx_L1_error)
12951  __Pyx_GOTREF(__pyx_t_11);
12952  __Pyx_GIVEREF(__pyx_t_3);
12953  PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
12954  __pyx_t_3 = 0;
12955  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_self->elementChildrenArrayList, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 293, __pyx_L1_error)
12956  __Pyx_GOTREF(__pyx_t_3);
12957  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12958  __Pyx_GIVEREF(__pyx_t_3);
12959  __Pyx_GOTREF(__pyx_v_self->elementChildrenArrayList);
12960  __Pyx_DECREF(__pyx_v_self->elementChildrenArrayList);
12961  __pyx_v_self->elementChildrenArrayList = ((PyObject*)__pyx_t_3);
12962  __pyx_t_3 = 0;
12963 
12964  /* "cmeshTools.pyx":294
12965  * dim = self.multilevelMesh.elementChildrenOffsets[n-1][self.multilevelMesh.meshArray[n-1].nElements_global]
12966  * self.elementChildrenArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenArray[n-1])]
12967  * dim = self.multilevelMesh.meshArray[n-1].nElements_global+1; # <<<<<<<<<<<<<<
12968  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
12969  *
12970  */
12971  __pyx_t_3 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 294, __pyx_L1_error)
12972  __Pyx_GOTREF(__pyx_t_3);
12973  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 294, __pyx_L1_error)
12974  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
12975  __pyx_v_dim = ((__pyx_v_self->multilevelMesh.meshArray[__pyx_t_12]).nElements_global + 1);
12976 
12977  /* "cmeshTools.pyx":295
12978  * self.elementChildrenArrayList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenArray[n-1])]
12979  * dim = self.multilevelMesh.meshArray[n-1].nElements_global+1;
12980  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])] # <<<<<<<<<<<<<<
12981  *
12982  * def buildPythonMultilevelMeshInterface(cmultilevelMesh):
12983  */
12984  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_np); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 295, __pyx_L1_error)
12985  __Pyx_GOTREF(__pyx_t_11);
12986  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_asarray); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 295, __pyx_L1_error)
12987  __Pyx_GOTREF(__pyx_t_1);
12988  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12989  __pyx_t_11 = __Pyx_PyInt_SubtractObjC(__pyx_v_n, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 295, __pyx_L1_error)
12990  __Pyx_GOTREF(__pyx_t_11);
12991  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_11); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(1, 295, __pyx_L1_error)
12992  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
12993  __pyx_t_9 = (__pyx_v_self->multilevelMesh.elementChildrenOffsets[__pyx_t_12]);
12994  if (!__pyx_t_9) {
12995  PyErr_SetString(PyExc_ValueError,"Cannot create cython.array from NULL pointer");
12996  __PYX_ERR(1, 295, __pyx_L1_error)
12997  }
12998  __pyx_t_8 = __pyx_format_from_typeinfo(&__Pyx_TypeInfo_int);
12999  __pyx_t_11 = Py_BuildValue((char*) "(" __PYX_BUILD_PY_SSIZE_T ")", ((Py_ssize_t)__pyx_v_dim));
13000  if (unlikely(!__pyx_t_8 || !__pyx_t_11 || !PyBytes_AsString(__pyx_t_8))) __PYX_ERR(1, 295, __pyx_L1_error)
13001  __Pyx_GOTREF(__pyx_t_8);
13002  __Pyx_GOTREF(__pyx_t_11);
13003  __pyx_t_10 = __pyx_array_new(__pyx_t_11, sizeof(int), PyBytes_AS_STRING(__pyx_t_8), (char *) "c", (char *) __pyx_t_9);
13004  if (unlikely(!__pyx_t_10)) __PYX_ERR(1, 295, __pyx_L1_error)
13005  __Pyx_GOTREF(__pyx_t_10);
13006  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
13007  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
13008  __pyx_t_8 = NULL;
13009  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
13010  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
13011  if (likely(__pyx_t_8)) {
13012  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
13013  __Pyx_INCREF(__pyx_t_8);
13014  __Pyx_INCREF(function);
13015  __Pyx_DECREF_SET(__pyx_t_1, function);
13016  }
13017  }
13018  __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_8, ((PyObject *)__pyx_t_10)) : __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)__pyx_t_10));
13019  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
13020  __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
13021  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 295, __pyx_L1_error)
13022  __Pyx_GOTREF(__pyx_t_3);
13023  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13024  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 295, __pyx_L1_error)
13025  __Pyx_GOTREF(__pyx_t_1);
13026  __Pyx_GIVEREF(__pyx_t_3);
13027  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
13028  __pyx_t_3 = 0;
13029  __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_self->elementChildrenOffsetsList, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 295, __pyx_L1_error)
13030  __Pyx_GOTREF(__pyx_t_3);
13031  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13032  __Pyx_GIVEREF(__pyx_t_3);
13033  __Pyx_GOTREF(__pyx_v_self->elementChildrenOffsetsList);
13034  __Pyx_DECREF(__pyx_v_self->elementChildrenOffsetsList);
13035  __pyx_v_self->elementChildrenOffsetsList = ((PyObject*)__pyx_t_3);
13036  __pyx_t_3 = 0;
13037 
13038  /* "cmeshTools.pyx":288
13039  * self.elementChildrenArrayList = []
13040  * self.elementChildrenOffsetsList = []
13041  * for n in range(1, self.multilevelMesh.nLevels): # <<<<<<<<<<<<<<
13042  * self.cmeshList += [CMesh_FromMesh(self.multilevelMesh.meshArray[n])]
13043  * dim = self.multilevelMesh.meshArray[n].nElements_global
13044  */
13045  }
13046  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13047 
13048  /* "cmeshTools.pyx":282
13049  * False);
13050  *
13051  * def buildPythonMultilevelMeshInterface(self): # <<<<<<<<<<<<<<
13052  * cdef int dim
13053  * self.cmeshList = [CMesh_FromMesh(self.multilevelMesh.meshArray[0])]
13054  */
13055 
13056  /* function exit code */
13057  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
13058  goto __pyx_L0;
13059  __pyx_L1_error:;
13060  __Pyx_XDECREF(__pyx_t_1);
13061  __Pyx_XDECREF(__pyx_t_2);
13062  __Pyx_XDECREF(__pyx_t_3);
13063  __Pyx_XDECREF(__pyx_t_8);
13064  __Pyx_XDECREF(((PyObject *)__pyx_t_10));
13065  __Pyx_XDECREF(__pyx_t_11);
13066  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.buildPythonMultilevelMeshInterface", __pyx_clineno, __pyx_lineno, __pyx_filename);
13067  __pyx_r = NULL;
13068  __pyx_L0:;
13069  __Pyx_XDECREF(__pyx_v_n);
13070  __Pyx_XGIVEREF(__pyx_r);
13071  __Pyx_RefNannyFinishContext();
13072  return __pyx_r;
13073 }
13074 
13075 /* "cmeshTools.pyx":202
13076  * cdef cppm.MultilevelMesh multilevelMesh
13077  * cdef public:
13078  * int nLevels # <<<<<<<<<<<<<<
13079  * list cmeshList
13080  * list elementParentsArrayList
13081  */
13082 
13083 /* Python wrapper */
13084 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_1__get__(PyObject *__pyx_v_self); /*proto*/
13085 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_1__get__(PyObject *__pyx_v_self) {
13086  PyObject *__pyx_r = 0;
13087  __Pyx_RefNannyDeclarations
13088  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13089  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels___get__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13090 
13091  /* function exit code */
13092  __Pyx_RefNannyFinishContext();
13093  return __pyx_r;
13094 }
13095 
13096 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13097  PyObject *__pyx_r = NULL;
13098  __Pyx_RefNannyDeclarations
13099  PyObject *__pyx_t_1 = NULL;
13100  __Pyx_RefNannySetupContext("__get__", 0);
13101  __Pyx_XDECREF(__pyx_r);
13102  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->nLevels); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 202, __pyx_L1_error)
13103  __Pyx_GOTREF(__pyx_t_1);
13104  __pyx_r = __pyx_t_1;
13105  __pyx_t_1 = 0;
13106  goto __pyx_L0;
13107 
13108  /* function exit code */
13109  __pyx_L1_error:;
13110  __Pyx_XDECREF(__pyx_t_1);
13111  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.nLevels.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13112  __pyx_r = NULL;
13113  __pyx_L0:;
13114  __Pyx_XGIVEREF(__pyx_r);
13115  __Pyx_RefNannyFinishContext();
13116  return __pyx_r;
13117 }
13118 
13119 /* Python wrapper */
13120 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
13121 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
13122  int __pyx_r;
13123  __Pyx_RefNannyDeclarations
13124  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
13125  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels_2__set__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
13126 
13127  /* function exit code */
13128  __Pyx_RefNannyFinishContext();
13129  return __pyx_r;
13130 }
13131 
13132 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_7nLevels_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value) {
13133  int __pyx_r;
13134  __Pyx_RefNannyDeclarations
13135  int __pyx_t_1;
13136  __Pyx_RefNannySetupContext("__set__", 0);
13137  __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 202, __pyx_L1_error)
13138  __pyx_v_self->nLevels = __pyx_t_1;
13139 
13140  /* function exit code */
13141  __pyx_r = 0;
13142  goto __pyx_L0;
13143  __pyx_L1_error:;
13144  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.nLevels.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13145  __pyx_r = -1;
13146  __pyx_L0:;
13147  __Pyx_RefNannyFinishContext();
13148  return __pyx_r;
13149 }
13150 
13151 /* "cmeshTools.pyx":203
13152  * cdef public:
13153  * int nLevels
13154  * list cmeshList # <<<<<<<<<<<<<<
13155  * list elementParentsArrayList
13156  * list elementChildrenArrayList
13157  */
13158 
13159 /* Python wrapper */
13160 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_1__get__(PyObject *__pyx_v_self); /*proto*/
13161 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_1__get__(PyObject *__pyx_v_self) {
13162  PyObject *__pyx_r = 0;
13163  __Pyx_RefNannyDeclarations
13164  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13165  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList___get__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13166 
13167  /* function exit code */
13168  __Pyx_RefNannyFinishContext();
13169  return __pyx_r;
13170 }
13171 
13172 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13173  PyObject *__pyx_r = NULL;
13174  __Pyx_RefNannyDeclarations
13175  __Pyx_RefNannySetupContext("__get__", 0);
13176  __Pyx_XDECREF(__pyx_r);
13177  __Pyx_INCREF(__pyx_v_self->cmeshList);
13178  __pyx_r = __pyx_v_self->cmeshList;
13179  goto __pyx_L0;
13180 
13181  /* function exit code */
13182  __pyx_L0:;
13183  __Pyx_XGIVEREF(__pyx_r);
13184  __Pyx_RefNannyFinishContext();
13185  return __pyx_r;
13186 }
13187 
13188 /* Python wrapper */
13189 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
13190 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
13191  int __pyx_r;
13192  __Pyx_RefNannyDeclarations
13193  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
13194  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_2__set__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
13195 
13196  /* function exit code */
13197  __Pyx_RefNannyFinishContext();
13198  return __pyx_r;
13199 }
13200 
13201 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value) {
13202  int __pyx_r;
13203  __Pyx_RefNannyDeclarations
13204  PyObject *__pyx_t_1 = NULL;
13205  __Pyx_RefNannySetupContext("__set__", 0);
13206  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 203, __pyx_L1_error)
13207  __pyx_t_1 = __pyx_v_value;
13208  __Pyx_INCREF(__pyx_t_1);
13209  __Pyx_GIVEREF(__pyx_t_1);
13210  __Pyx_GOTREF(__pyx_v_self->cmeshList);
13211  __Pyx_DECREF(__pyx_v_self->cmeshList);
13212  __pyx_v_self->cmeshList = ((PyObject*)__pyx_t_1);
13213  __pyx_t_1 = 0;
13214 
13215  /* function exit code */
13216  __pyx_r = 0;
13217  goto __pyx_L0;
13218  __pyx_L1_error:;
13219  __Pyx_XDECREF(__pyx_t_1);
13220  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.cmeshList.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13221  __pyx_r = -1;
13222  __pyx_L0:;
13223  __Pyx_RefNannyFinishContext();
13224  return __pyx_r;
13225 }
13226 
13227 /* Python wrapper */
13228 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_5__del__(PyObject *__pyx_v_self); /*proto*/
13229 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_5__del__(PyObject *__pyx_v_self) {
13230  int __pyx_r;
13231  __Pyx_RefNannyDeclarations
13232  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
13233  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_4__del__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13234 
13235  /* function exit code */
13236  __Pyx_RefNannyFinishContext();
13237  return __pyx_r;
13238 }
13239 
13240 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_9cmeshList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13241  int __pyx_r;
13242  __Pyx_RefNannyDeclarations
13243  __Pyx_RefNannySetupContext("__del__", 0);
13244  __Pyx_INCREF(Py_None);
13245  __Pyx_GIVEREF(Py_None);
13246  __Pyx_GOTREF(__pyx_v_self->cmeshList);
13247  __Pyx_DECREF(__pyx_v_self->cmeshList);
13248  __pyx_v_self->cmeshList = ((PyObject*)Py_None);
13249 
13250  /* function exit code */
13251  __pyx_r = 0;
13252  __Pyx_RefNannyFinishContext();
13253  return __pyx_r;
13254 }
13255 
13256 /* "cmeshTools.pyx":204
13257  * int nLevels
13258  * list cmeshList
13259  * list elementParentsArrayList # <<<<<<<<<<<<<<
13260  * list elementChildrenArrayList
13261  * list elementChildrenOffsetsList
13262  */
13263 
13264 /* Python wrapper */
13265 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_1__get__(PyObject *__pyx_v_self); /*proto*/
13266 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_1__get__(PyObject *__pyx_v_self) {
13267  PyObject *__pyx_r = 0;
13268  __Pyx_RefNannyDeclarations
13269  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13270  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList___get__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13271 
13272  /* function exit code */
13273  __Pyx_RefNannyFinishContext();
13274  return __pyx_r;
13275 }
13276 
13277 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13278  PyObject *__pyx_r = NULL;
13279  __Pyx_RefNannyDeclarations
13280  __Pyx_RefNannySetupContext("__get__", 0);
13281  __Pyx_XDECREF(__pyx_r);
13282  __Pyx_INCREF(__pyx_v_self->elementParentsArrayList);
13283  __pyx_r = __pyx_v_self->elementParentsArrayList;
13284  goto __pyx_L0;
13285 
13286  /* function exit code */
13287  __pyx_L0:;
13288  __Pyx_XGIVEREF(__pyx_r);
13289  __Pyx_RefNannyFinishContext();
13290  return __pyx_r;
13291 }
13292 
13293 /* Python wrapper */
13294 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
13295 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
13296  int __pyx_r;
13297  __Pyx_RefNannyDeclarations
13298  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
13299  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_2__set__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
13300 
13301  /* function exit code */
13302  __Pyx_RefNannyFinishContext();
13303  return __pyx_r;
13304 }
13305 
13306 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value) {
13307  int __pyx_r;
13308  __Pyx_RefNannyDeclarations
13309  PyObject *__pyx_t_1 = NULL;
13310  __Pyx_RefNannySetupContext("__set__", 0);
13311  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 204, __pyx_L1_error)
13312  __pyx_t_1 = __pyx_v_value;
13313  __Pyx_INCREF(__pyx_t_1);
13314  __Pyx_GIVEREF(__pyx_t_1);
13315  __Pyx_GOTREF(__pyx_v_self->elementParentsArrayList);
13316  __Pyx_DECREF(__pyx_v_self->elementParentsArrayList);
13317  __pyx_v_self->elementParentsArrayList = ((PyObject*)__pyx_t_1);
13318  __pyx_t_1 = 0;
13319 
13320  /* function exit code */
13321  __pyx_r = 0;
13322  goto __pyx_L0;
13323  __pyx_L1_error:;
13324  __Pyx_XDECREF(__pyx_t_1);
13325  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.elementParentsArrayList.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13326  __pyx_r = -1;
13327  __pyx_L0:;
13328  __Pyx_RefNannyFinishContext();
13329  return __pyx_r;
13330 }
13331 
13332 /* Python wrapper */
13333 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_5__del__(PyObject *__pyx_v_self); /*proto*/
13334 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_5__del__(PyObject *__pyx_v_self) {
13335  int __pyx_r;
13336  __Pyx_RefNannyDeclarations
13337  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
13338  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_4__del__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13339 
13340  /* function exit code */
13341  __Pyx_RefNannyFinishContext();
13342  return __pyx_r;
13343 }
13344 
13345 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13346  int __pyx_r;
13347  __Pyx_RefNannyDeclarations
13348  __Pyx_RefNannySetupContext("__del__", 0);
13349  __Pyx_INCREF(Py_None);
13350  __Pyx_GIVEREF(Py_None);
13351  __Pyx_GOTREF(__pyx_v_self->elementParentsArrayList);
13352  __Pyx_DECREF(__pyx_v_self->elementParentsArrayList);
13353  __pyx_v_self->elementParentsArrayList = ((PyObject*)Py_None);
13354 
13355  /* function exit code */
13356  __pyx_r = 0;
13357  __Pyx_RefNannyFinishContext();
13358  return __pyx_r;
13359 }
13360 
13361 /* "cmeshTools.pyx":205
13362  * list cmeshList
13363  * list elementParentsArrayList
13364  * list elementChildrenArrayList # <<<<<<<<<<<<<<
13365  * list elementChildrenOffsetsList
13366  * def __init__(self, CMesh cmesh, nLevels):
13367  */
13368 
13369 /* Python wrapper */
13370 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_1__get__(PyObject *__pyx_v_self); /*proto*/
13371 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_1__get__(PyObject *__pyx_v_self) {
13372  PyObject *__pyx_r = 0;
13373  __Pyx_RefNannyDeclarations
13374  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13375  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList___get__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13376 
13377  /* function exit code */
13378  __Pyx_RefNannyFinishContext();
13379  return __pyx_r;
13380 }
13381 
13382 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13383  PyObject *__pyx_r = NULL;
13384  __Pyx_RefNannyDeclarations
13385  __Pyx_RefNannySetupContext("__get__", 0);
13386  __Pyx_XDECREF(__pyx_r);
13387  __Pyx_INCREF(__pyx_v_self->elementChildrenArrayList);
13388  __pyx_r = __pyx_v_self->elementChildrenArrayList;
13389  goto __pyx_L0;
13390 
13391  /* function exit code */
13392  __pyx_L0:;
13393  __Pyx_XGIVEREF(__pyx_r);
13394  __Pyx_RefNannyFinishContext();
13395  return __pyx_r;
13396 }
13397 
13398 /* Python wrapper */
13399 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
13400 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
13401  int __pyx_r;
13402  __Pyx_RefNannyDeclarations
13403  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
13404  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_2__set__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
13405 
13406  /* function exit code */
13407  __Pyx_RefNannyFinishContext();
13408  return __pyx_r;
13409 }
13410 
13411 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value) {
13412  int __pyx_r;
13413  __Pyx_RefNannyDeclarations
13414  PyObject *__pyx_t_1 = NULL;
13415  __Pyx_RefNannySetupContext("__set__", 0);
13416  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 205, __pyx_L1_error)
13417  __pyx_t_1 = __pyx_v_value;
13418  __Pyx_INCREF(__pyx_t_1);
13419  __Pyx_GIVEREF(__pyx_t_1);
13420  __Pyx_GOTREF(__pyx_v_self->elementChildrenArrayList);
13421  __Pyx_DECREF(__pyx_v_self->elementChildrenArrayList);
13422  __pyx_v_self->elementChildrenArrayList = ((PyObject*)__pyx_t_1);
13423  __pyx_t_1 = 0;
13424 
13425  /* function exit code */
13426  __pyx_r = 0;
13427  goto __pyx_L0;
13428  __pyx_L1_error:;
13429  __Pyx_XDECREF(__pyx_t_1);
13430  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.elementChildrenArrayList.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13431  __pyx_r = -1;
13432  __pyx_L0:;
13433  __Pyx_RefNannyFinishContext();
13434  return __pyx_r;
13435 }
13436 
13437 /* Python wrapper */
13438 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_5__del__(PyObject *__pyx_v_self); /*proto*/
13439 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_5__del__(PyObject *__pyx_v_self) {
13440  int __pyx_r;
13441  __Pyx_RefNannyDeclarations
13442  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
13443  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_4__del__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13444 
13445  /* function exit code */
13446  __Pyx_RefNannyFinishContext();
13447  return __pyx_r;
13448 }
13449 
13450 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13451  int __pyx_r;
13452  __Pyx_RefNannyDeclarations
13453  __Pyx_RefNannySetupContext("__del__", 0);
13454  __Pyx_INCREF(Py_None);
13455  __Pyx_GIVEREF(Py_None);
13456  __Pyx_GOTREF(__pyx_v_self->elementChildrenArrayList);
13457  __Pyx_DECREF(__pyx_v_self->elementChildrenArrayList);
13458  __pyx_v_self->elementChildrenArrayList = ((PyObject*)Py_None);
13459 
13460  /* function exit code */
13461  __pyx_r = 0;
13462  __Pyx_RefNannyFinishContext();
13463  return __pyx_r;
13464 }
13465 
13466 /* "cmeshTools.pyx":206
13467  * list elementParentsArrayList
13468  * list elementChildrenArrayList
13469  * list elementChildrenOffsetsList # <<<<<<<<<<<<<<
13470  * def __init__(self, CMesh cmesh, nLevels):
13471  * self.multilevelMesh = cppm.MultilevelMesh()
13472  */
13473 
13474 /* Python wrapper */
13475 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_1__get__(PyObject *__pyx_v_self); /*proto*/
13476 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_1__get__(PyObject *__pyx_v_self) {
13477  PyObject *__pyx_r = 0;
13478  __Pyx_RefNannyDeclarations
13479  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
13480  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList___get__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13481 
13482  /* function exit code */
13483  __Pyx_RefNannyFinishContext();
13484  return __pyx_r;
13485 }
13486 
13487 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList___get__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13488  PyObject *__pyx_r = NULL;
13489  __Pyx_RefNannyDeclarations
13490  __Pyx_RefNannySetupContext("__get__", 0);
13491  __Pyx_XDECREF(__pyx_r);
13492  __Pyx_INCREF(__pyx_v_self->elementChildrenOffsetsList);
13493  __pyx_r = __pyx_v_self->elementChildrenOffsetsList;
13494  goto __pyx_L0;
13495 
13496  /* function exit code */
13497  __pyx_L0:;
13498  __Pyx_XGIVEREF(__pyx_r);
13499  __Pyx_RefNannyFinishContext();
13500  return __pyx_r;
13501 }
13502 
13503 /* Python wrapper */
13504 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
13505 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
13506  int __pyx_r;
13507  __Pyx_RefNannyDeclarations
13508  __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
13509  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_2__set__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v_value));
13510 
13511  /* function exit code */
13512  __Pyx_RefNannyFinishContext();
13513  return __pyx_r;
13514 }
13515 
13516 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_2__set__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, PyObject *__pyx_v_value) {
13517  int __pyx_r;
13518  __Pyx_RefNannyDeclarations
13519  PyObject *__pyx_t_1 = NULL;
13520  __Pyx_RefNannySetupContext("__set__", 0);
13521  if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(1, 206, __pyx_L1_error)
13522  __pyx_t_1 = __pyx_v_value;
13523  __Pyx_INCREF(__pyx_t_1);
13524  __Pyx_GIVEREF(__pyx_t_1);
13525  __Pyx_GOTREF(__pyx_v_self->elementChildrenOffsetsList);
13526  __Pyx_DECREF(__pyx_v_self->elementChildrenOffsetsList);
13527  __pyx_v_self->elementChildrenOffsetsList = ((PyObject*)__pyx_t_1);
13528  __pyx_t_1 = 0;
13529 
13530  /* function exit code */
13531  __pyx_r = 0;
13532  goto __pyx_L0;
13533  __pyx_L1_error:;
13534  __Pyx_XDECREF(__pyx_t_1);
13535  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.elementChildrenOffsetsList.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13536  __pyx_r = -1;
13537  __pyx_L0:;
13538  __Pyx_RefNannyFinishContext();
13539  return __pyx_r;
13540 }
13541 
13542 /* Python wrapper */
13543 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_5__del__(PyObject *__pyx_v_self); /*proto*/
13544 static int __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_5__del__(PyObject *__pyx_v_self) {
13545  int __pyx_r;
13546  __Pyx_RefNannyDeclarations
13547  __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
13548  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_4__del__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13549 
13550  /* function exit code */
13551  __Pyx_RefNannyFinishContext();
13552  return __pyx_r;
13553 }
13554 
13555 static int __pyx_pf_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_4__del__(struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13556  int __pyx_r;
13557  __Pyx_RefNannyDeclarations
13558  __Pyx_RefNannySetupContext("__del__", 0);
13559  __Pyx_INCREF(Py_None);
13560  __Pyx_GIVEREF(Py_None);
13561  __Pyx_GOTREF(__pyx_v_self->elementChildrenOffsetsList);
13562  __Pyx_DECREF(__pyx_v_self->elementChildrenOffsetsList);
13563  __pyx_v_self->elementChildrenOffsetsList = ((PyObject*)Py_None);
13564 
13565  /* function exit code */
13566  __pyx_r = 0;
13567  __Pyx_RefNannyFinishContext();
13568  return __pyx_r;
13569 }
13570 
13571 /* "(tree fragment)":1
13572  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
13573  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13574  * def __setstate_cython__(self, __pyx_state):
13575  */
13576 
13577 /* Python wrapper */
13578 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
13579 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
13580  PyObject *__pyx_r = 0;
13581  __Pyx_RefNannyDeclarations
13582  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
13583  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_4__reduce_cython__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self));
13584 
13585  /* function exit code */
13586  __Pyx_RefNannyFinishContext();
13587  return __pyx_r;
13588 }
13589 
13590 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self) {
13591  PyObject *__pyx_r = NULL;
13592  __Pyx_RefNannyDeclarations
13593  PyObject *__pyx_t_1 = NULL;
13594  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
13595 
13596  /* "(tree fragment)":2
13597  * def __reduce_cython__(self):
13598  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
13599  * def __setstate_cython__(self, __pyx_state):
13600  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13601  */
13602  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
13603  __Pyx_GOTREF(__pyx_t_1);
13604  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
13605  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13606  __PYX_ERR(0, 2, __pyx_L1_error)
13607 
13608  /* "(tree fragment)":1
13609  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
13610  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13611  * def __setstate_cython__(self, __pyx_state):
13612  */
13613 
13614  /* function exit code */
13615  __pyx_L1_error:;
13616  __Pyx_XDECREF(__pyx_t_1);
13617  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13618  __pyx_r = NULL;
13619  __Pyx_XGIVEREF(__pyx_r);
13620  __Pyx_RefNannyFinishContext();
13621  return __pyx_r;
13622 }
13623 
13624 /* "(tree fragment)":3
13625  * def __reduce_cython__(self):
13626  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13627  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
13628  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13629  */
13630 
13631 /* Python wrapper */
13632 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
13633 static PyObject *__pyx_pw_10cmeshTools_15CMultilevelMesh_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
13634  PyObject *__pyx_r = 0;
13635  __Pyx_RefNannyDeclarations
13636  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
13637  __pyx_r = __pyx_pf_10cmeshTools_15CMultilevelMesh_6__setstate_cython__(((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
13638 
13639  /* function exit code */
13640  __Pyx_RefNannyFinishContext();
13641  return __pyx_r;
13642 }
13643 
13644 static PyObject *__pyx_pf_10cmeshTools_15CMultilevelMesh_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
13645  PyObject *__pyx_r = NULL;
13646  __Pyx_RefNannyDeclarations
13647  PyObject *__pyx_t_1 = NULL;
13648  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
13649 
13650  /* "(tree fragment)":4
13651  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13652  * def __setstate_cython__(self, __pyx_state):
13653  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
13654  */
13655  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
13656  __Pyx_GOTREF(__pyx_t_1);
13657  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
13658  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13659  __PYX_ERR(0, 4, __pyx_L1_error)
13660 
13661  /* "(tree fragment)":3
13662  * def __reduce_cython__(self):
13663  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13664  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
13665  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
13666  */
13667 
13668  /* function exit code */
13669  __pyx_L1_error:;
13670  __Pyx_XDECREF(__pyx_t_1);
13671  __Pyx_AddTraceback("cmeshTools.CMultilevelMesh.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
13672  __pyx_r = NULL;
13673  __Pyx_XGIVEREF(__pyx_r);
13674  __Pyx_RefNannyFinishContext();
13675  return __pyx_r;
13676 }
13677 
13678 /* "cmeshTools.pyx":297
13679  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
13680  *
13681  * def buildPythonMultilevelMeshInterface(cmultilevelMesh): # <<<<<<<<<<<<<<
13682  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
13683  * return (cmultilevelMesh.nLevels,
13684  */
13685 
13686 /* Python wrapper */
13687 static PyObject *__pyx_pw_10cmeshTools_5buildPythonMultilevelMeshInterface(PyObject *__pyx_self, PyObject *__pyx_v_cmultilevelMesh); /*proto*/
13688 static PyMethodDef __pyx_mdef_10cmeshTools_5buildPythonMultilevelMeshInterface = {"buildPythonMultilevelMeshInterface", (PyCFunction)__pyx_pw_10cmeshTools_5buildPythonMultilevelMeshInterface, METH_O, 0};
13689 static PyObject *__pyx_pw_10cmeshTools_5buildPythonMultilevelMeshInterface(PyObject *__pyx_self, PyObject *__pyx_v_cmultilevelMesh) {
13690  PyObject *__pyx_r = 0;
13691  __Pyx_RefNannyDeclarations
13692  __Pyx_RefNannySetupContext("buildPythonMultilevelMeshInterface (wrapper)", 0);
13693  __pyx_r = __pyx_pf_10cmeshTools_4buildPythonMultilevelMeshInterface(__pyx_self, ((PyObject *)__pyx_v_cmultilevelMesh));
13694 
13695  /* function exit code */
13696  __Pyx_RefNannyFinishContext();
13697  return __pyx_r;
13698 }
13699 
13700 static PyObject *__pyx_pf_10cmeshTools_4buildPythonMultilevelMeshInterface(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_cmultilevelMesh) {
13701  PyObject *__pyx_r = NULL;
13702  __Pyx_RefNannyDeclarations
13703  PyObject *__pyx_t_1 = NULL;
13704  PyObject *__pyx_t_2 = NULL;
13705  PyObject *__pyx_t_3 = NULL;
13706  PyObject *__pyx_t_4 = NULL;
13707  PyObject *__pyx_t_5 = NULL;
13708  PyObject *__pyx_t_6 = NULL;
13709  __Pyx_RefNannySetupContext("buildPythonMultilevelMeshInterface", 0);
13710 
13711  /* "cmeshTools.pyx":298
13712  *
13713  * def buildPythonMultilevelMeshInterface(cmultilevelMesh):
13714  * cmultilevelMesh.buildPythonMultilevelMeshInterface() # <<<<<<<<<<<<<<
13715  * return (cmultilevelMesh.nLevels,
13716  * cmultilevelMesh.cmeshList,
13717  */
13718  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_buildPythonMultilevelMeshInterfa); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 298, __pyx_L1_error)
13719  __Pyx_GOTREF(__pyx_t_2);
13720  __pyx_t_3 = NULL;
13721  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
13722  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
13723  if (likely(__pyx_t_3)) {
13724  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
13725  __Pyx_INCREF(__pyx_t_3);
13726  __Pyx_INCREF(function);
13727  __Pyx_DECREF_SET(__pyx_t_2, function);
13728  }
13729  }
13730  __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2);
13731  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
13732  if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 298, __pyx_L1_error)
13733  __Pyx_GOTREF(__pyx_t_1);
13734  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13735  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
13736 
13737  /* "cmeshTools.pyx":299
13738  * def buildPythonMultilevelMeshInterface(cmultilevelMesh):
13739  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
13740  * return (cmultilevelMesh.nLevels, # <<<<<<<<<<<<<<
13741  * cmultilevelMesh.cmeshList,
13742  * cmultilevelMesh.elementParentsArrayList,
13743  */
13744  __Pyx_XDECREF(__pyx_r);
13745  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_nLevels); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 299, __pyx_L1_error)
13746  __Pyx_GOTREF(__pyx_t_1);
13747 
13748  /* "cmeshTools.pyx":300
13749  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
13750  * return (cmultilevelMesh.nLevels,
13751  * cmultilevelMesh.cmeshList, # <<<<<<<<<<<<<<
13752  * cmultilevelMesh.elementParentsArrayList,
13753  * cmultilevelMesh.elementChildrenArrayList,
13754  */
13755  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_cmeshList); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 300, __pyx_L1_error)
13756  __Pyx_GOTREF(__pyx_t_2);
13757 
13758  /* "cmeshTools.pyx":301
13759  * return (cmultilevelMesh.nLevels,
13760  * cmultilevelMesh.cmeshList,
13761  * cmultilevelMesh.elementParentsArrayList, # <<<<<<<<<<<<<<
13762  * cmultilevelMesh.elementChildrenArrayList,
13763  * cmultilevelMesh.elementChildrenOffsetsList)
13764  */
13765  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_elementParentsArrayList); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 301, __pyx_L1_error)
13766  __Pyx_GOTREF(__pyx_t_3);
13767 
13768  /* "cmeshTools.pyx":302
13769  * cmultilevelMesh.cmeshList,
13770  * cmultilevelMesh.elementParentsArrayList,
13771  * cmultilevelMesh.elementChildrenArrayList, # <<<<<<<<<<<<<<
13772  * cmultilevelMesh.elementChildrenOffsetsList)
13773  *
13774  */
13775  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_elementChildrenArrayList); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 302, __pyx_L1_error)
13776  __Pyx_GOTREF(__pyx_t_4);
13777 
13778  /* "cmeshTools.pyx":303
13779  * cmultilevelMesh.elementParentsArrayList,
13780  * cmultilevelMesh.elementChildrenArrayList,
13781  * cmultilevelMesh.elementChildrenOffsetsList) # <<<<<<<<<<<<<<
13782  *
13783  * cpdef void generateTetrahedralMeshFromRectangularGrid(int nx,
13784  */
13785  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_cmultilevelMesh, __pyx_n_s_elementChildrenOffsetsList); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 303, __pyx_L1_error)
13786  __Pyx_GOTREF(__pyx_t_5);
13787 
13788  /* "cmeshTools.pyx":299
13789  * def buildPythonMultilevelMeshInterface(cmultilevelMesh):
13790  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
13791  * return (cmultilevelMesh.nLevels, # <<<<<<<<<<<<<<
13792  * cmultilevelMesh.cmeshList,
13793  * cmultilevelMesh.elementParentsArrayList,
13794  */
13795  __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 299, __pyx_L1_error)
13796  __Pyx_GOTREF(__pyx_t_6);
13797  __Pyx_GIVEREF(__pyx_t_1);
13798  PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1);
13799  __Pyx_GIVEREF(__pyx_t_2);
13800  PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2);
13801  __Pyx_GIVEREF(__pyx_t_3);
13802  PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3);
13803  __Pyx_GIVEREF(__pyx_t_4);
13804  PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_4);
13805  __Pyx_GIVEREF(__pyx_t_5);
13806  PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_t_5);
13807  __pyx_t_1 = 0;
13808  __pyx_t_2 = 0;
13809  __pyx_t_3 = 0;
13810  __pyx_t_4 = 0;
13811  __pyx_t_5 = 0;
13812  __pyx_r = __pyx_t_6;
13813  __pyx_t_6 = 0;
13814  goto __pyx_L0;
13815 
13816  /* "cmeshTools.pyx":297
13817  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
13818  *
13819  * def buildPythonMultilevelMeshInterface(cmultilevelMesh): # <<<<<<<<<<<<<<
13820  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
13821  * return (cmultilevelMesh.nLevels,
13822  */
13823 
13824  /* function exit code */
13825  __pyx_L1_error:;
13826  __Pyx_XDECREF(__pyx_t_1);
13827  __Pyx_XDECREF(__pyx_t_2);
13828  __Pyx_XDECREF(__pyx_t_3);
13829  __Pyx_XDECREF(__pyx_t_4);
13830  __Pyx_XDECREF(__pyx_t_5);
13831  __Pyx_XDECREF(__pyx_t_6);
13832  __Pyx_AddTraceback("cmeshTools.buildPythonMultilevelMeshInterface", __pyx_clineno, __pyx_lineno, __pyx_filename);
13833  __pyx_r = NULL;
13834  __pyx_L0:;
13835  __Pyx_XGIVEREF(__pyx_r);
13836  __Pyx_RefNannyFinishContext();
13837  return __pyx_r;
13838 }
13839 
13840 /* "cmeshTools.pyx":305
13841  * cmultilevelMesh.elementChildrenOffsetsList)
13842  *
13843  * cpdef void generateTetrahedralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
13844  * int ny,
13845  * int nz,
13846  */
13847 
13848 static PyObject *__pyx_pw_10cmeshTools_7generateTetrahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13849 static void __pyx_f_10cmeshTools_generateTetrahedralMeshFromRectangularGrid(int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
13850  __Pyx_RefNannyDeclarations
13851  __Pyx_RefNannySetupContext("generateTetrahedralMeshFromRectangularGrid", 0);
13852 
13853  /* "cmeshTools.pyx":312
13854  * double Lz,
13855  * CMesh cmesh):
13856  * cppm.regularHexahedralToTetrahedralMeshElements(nx,ny,nz,cmesh.mesh); # <<<<<<<<<<<<<<
13857  * cppm.regularHexahedralToTetrahedralMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
13858  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
13859  */
13860  (void)(regularHexahedralToTetrahedralMeshElements(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_cmesh->mesh));
13861 
13862  /* "cmeshTools.pyx":313
13863  * CMesh cmesh):
13864  * cppm.regularHexahedralToTetrahedralMeshElements(nx,ny,nz,cmesh.mesh);
13865  * cppm.regularHexahedralToTetrahedralMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh); # <<<<<<<<<<<<<<
13866  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
13867  * cppm.regularHexahedralToTetrahedralElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
13868  */
13869  (void)(regularHexahedralToTetrahedralMeshNodes(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh->mesh));
13870 
13871  /* "cmeshTools.pyx":314
13872  * cppm.regularHexahedralToTetrahedralMeshElements(nx,ny,nz,cmesh.mesh);
13873  * cppm.regularHexahedralToTetrahedralMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
13874  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
13875  * cppm.regularHexahedralToTetrahedralElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
13876  *
13877  */
13878  (void)(constructElementBoundaryElementsArray_tetrahedron(__pyx_v_cmesh->mesh));
13879 
13880  /* "cmeshTools.pyx":315
13881  * cppm.regularHexahedralToTetrahedralMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
13882  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
13883  * cppm.regularHexahedralToTetrahedralElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh); # <<<<<<<<<<<<<<
13884  *
13885  * cpdef void cmeshToolsComputeGeometricInfo_tetrahedron(CMesh cmesh):
13886  */
13887  (void)(regularHexahedralToTetrahedralElementBoundaryMaterials(__pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh->mesh));
13888 
13889  /* "cmeshTools.pyx":305
13890  * cmultilevelMesh.elementChildrenOffsetsList)
13891  *
13892  * cpdef void generateTetrahedralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
13893  * int ny,
13894  * int nz,
13895  */
13896 
13897  /* function exit code */
13898  __Pyx_RefNannyFinishContext();
13899 }
13900 
13901 /* Python wrapper */
13902 static PyObject *__pyx_pw_10cmeshTools_7generateTetrahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
13903 static PyObject *__pyx_pw_10cmeshTools_7generateTetrahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
13904  int __pyx_v_nx;
13905  int __pyx_v_ny;
13906  int __pyx_v_nz;
13907  double __pyx_v_Lx;
13908  double __pyx_v_Ly;
13909  double __pyx_v_Lz;
13910  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
13911  PyObject *__pyx_r = 0;
13912  __Pyx_RefNannyDeclarations
13913  __Pyx_RefNannySetupContext("generateTetrahedralMeshFromRectangularGrid (wrapper)", 0);
13914  {
13915  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nx,&__pyx_n_s_ny,&__pyx_n_s_nz,&__pyx_n_s_Lx,&__pyx_n_s_Ly,&__pyx_n_s_Lz,&__pyx_n_s_cmesh,0};
13916  PyObject* values[7] = {0,0,0,0,0,0,0};
13917  if (unlikely(__pyx_kwds)) {
13918  Py_ssize_t kw_args;
13919  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
13920  switch (pos_args) {
13921  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
13922  CYTHON_FALLTHROUGH;
13923  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
13924  CYTHON_FALLTHROUGH;
13925  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
13926  CYTHON_FALLTHROUGH;
13927  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
13928  CYTHON_FALLTHROUGH;
13929  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
13930  CYTHON_FALLTHROUGH;
13931  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13932  CYTHON_FALLTHROUGH;
13933  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13934  CYTHON_FALLTHROUGH;
13935  case 0: break;
13936  default: goto __pyx_L5_argtuple_error;
13937  }
13938  kw_args = PyDict_Size(__pyx_kwds);
13939  switch (pos_args) {
13940  case 0:
13941  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;
13942  else goto __pyx_L5_argtuple_error;
13943  CYTHON_FALLTHROUGH;
13944  case 1:
13945  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ny)) != 0)) kw_args--;
13946  else {
13947  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 1); __PYX_ERR(1, 305, __pyx_L3_error)
13948  }
13949  CYTHON_FALLTHROUGH;
13950  case 2:
13951  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nz)) != 0)) kw_args--;
13952  else {
13953  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 2); __PYX_ERR(1, 305, __pyx_L3_error)
13954  }
13955  CYTHON_FALLTHROUGH;
13956  case 3:
13957  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lx)) != 0)) kw_args--;
13958  else {
13959  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 3); __PYX_ERR(1, 305, __pyx_L3_error)
13960  }
13961  CYTHON_FALLTHROUGH;
13962  case 4:
13963  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Ly)) != 0)) kw_args--;
13964  else {
13965  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 4); __PYX_ERR(1, 305, __pyx_L3_error)
13966  }
13967  CYTHON_FALLTHROUGH;
13968  case 5:
13969  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lz)) != 0)) kw_args--;
13970  else {
13971  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 5); __PYX_ERR(1, 305, __pyx_L3_error)
13972  }
13973  CYTHON_FALLTHROUGH;
13974  case 6:
13975  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
13976  else {
13977  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, 6); __PYX_ERR(1, 305, __pyx_L3_error)
13978  }
13979  }
13980  if (unlikely(kw_args > 0)) {
13981  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateTetrahedralMeshFromRectangularGrid") < 0)) __PYX_ERR(1, 305, __pyx_L3_error)
13982  }
13983  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
13984  goto __pyx_L5_argtuple_error;
13985  } else {
13986  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
13987  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
13988  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
13989  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
13990  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
13991  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
13992  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
13993  }
13994  __pyx_v_nx = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 305, __pyx_L3_error)
13995  __pyx_v_ny = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ny == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 306, __pyx_L3_error)
13996  __pyx_v_nz = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nz == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 307, __pyx_L3_error)
13997  __pyx_v_Lx = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_Lx == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 308, __pyx_L3_error)
13998  __pyx_v_Ly = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_Ly == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 309, __pyx_L3_error)
13999  __pyx_v_Lz = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_Lz == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 310, __pyx_L3_error)
14000  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[6]);
14001  }
14002  goto __pyx_L4_argument_unpacking_done;
14003  __pyx_L5_argtuple_error:;
14004  __Pyx_RaiseArgtupleInvalid("generateTetrahedralMeshFromRectangularGrid", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 305, __pyx_L3_error)
14005  __pyx_L3_error:;
14006  __Pyx_AddTraceback("cmeshTools.generateTetrahedralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
14007  __Pyx_RefNannyFinishContext();
14008  return NULL;
14009  __pyx_L4_argument_unpacking_done:;
14010  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 311, __pyx_L1_error)
14011  __pyx_r = __pyx_pf_10cmeshTools_6generateTetrahedralMeshFromRectangularGrid(__pyx_self, __pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh);
14012 
14013  /* function exit code */
14014  goto __pyx_L0;
14015  __pyx_L1_error:;
14016  __pyx_r = NULL;
14017  __pyx_L0:;
14018  __Pyx_RefNannyFinishContext();
14019  return __pyx_r;
14020 }
14021 
14022 static PyObject *__pyx_pf_10cmeshTools_6generateTetrahedralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
14023  PyObject *__pyx_r = NULL;
14024  __Pyx_RefNannyDeclarations
14025  PyObject *__pyx_t_1 = NULL;
14026  __Pyx_RefNannySetupContext("generateTetrahedralMeshFromRectangularGrid", 0);
14027  __Pyx_XDECREF(__pyx_r);
14028  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateTetrahedralMeshFromRectangularGrid(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 305, __pyx_L1_error)
14029  __Pyx_GOTREF(__pyx_t_1);
14030  __pyx_r = __pyx_t_1;
14031  __pyx_t_1 = 0;
14032  goto __pyx_L0;
14033 
14034  /* function exit code */
14035  __pyx_L1_error:;
14036  __Pyx_XDECREF(__pyx_t_1);
14037  __Pyx_AddTraceback("cmeshTools.generateTetrahedralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
14038  __pyx_r = NULL;
14039  __pyx_L0:;
14040  __Pyx_XGIVEREF(__pyx_r);
14041  __Pyx_RefNannyFinishContext();
14042  return __pyx_r;
14043 }
14044 
14045 /* "cmeshTools.pyx":317
14046  * cppm.regularHexahedralToTetrahedralElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
14047  *
14048  * cpdef void cmeshToolsComputeGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
14049  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh)
14050  *
14051  */
14052 
14053 static PyObject *__pyx_pw_10cmeshTools_9cmeshToolsComputeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
14054 static void __pyx_f_10cmeshTools_cmeshToolsComputeGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
14055  __Pyx_RefNannyDeclarations
14056  __Pyx_RefNannySetupContext("cmeshToolsComputeGeometricInfo_tetrahedron", 0);
14057 
14058  /* "cmeshTools.pyx":318
14059  *
14060  * cpdef void cmeshToolsComputeGeometricInfo_tetrahedron(CMesh cmesh):
14061  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh) # <<<<<<<<<<<<<<
14062  *
14063  * # cdef static void cmeshToolsLocallyRefineMultilevelMesh(CMultilevelMesh cmesh,
14064  */
14065  (void)(computeGeometricInfo_tetrahedron(__pyx_v_cmesh->mesh));
14066 
14067  /* "cmeshTools.pyx":317
14068  * cppm.regularHexahedralToTetrahedralElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
14069  *
14070  * cpdef void cmeshToolsComputeGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
14071  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh)
14072  *
14073  */
14074 
14075  /* function exit code */
14076  __Pyx_RefNannyFinishContext();
14077 }
14078 
14079 /* Python wrapper */
14080 static PyObject *__pyx_pw_10cmeshTools_9cmeshToolsComputeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
14081 static PyObject *__pyx_pw_10cmeshTools_9cmeshToolsComputeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
14082  PyObject *__pyx_r = 0;
14083  __Pyx_RefNannyDeclarations
14084  __Pyx_RefNannySetupContext("cmeshToolsComputeGeometricInfo_tetrahedron (wrapper)", 0);
14085  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 317, __pyx_L1_error)
14086  __pyx_r = __pyx_pf_10cmeshTools_8cmeshToolsComputeGeometricInfo_tetrahedron(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
14087 
14088  /* function exit code */
14089  goto __pyx_L0;
14090  __pyx_L1_error:;
14091  __pyx_r = NULL;
14092  __pyx_L0:;
14093  __Pyx_RefNannyFinishContext();
14094  return __pyx_r;
14095 }
14096 
14097 static PyObject *__pyx_pf_10cmeshTools_8cmeshToolsComputeGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
14098  PyObject *__pyx_r = NULL;
14099  __Pyx_RefNannyDeclarations
14100  PyObject *__pyx_t_1 = NULL;
14101  __Pyx_RefNannySetupContext("cmeshToolsComputeGeometricInfo_tetrahedron", 0);
14102  __Pyx_XDECREF(__pyx_r);
14103  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_cmeshToolsComputeGeometricInfo_tetrahedron(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 317, __pyx_L1_error)
14104  __Pyx_GOTREF(__pyx_t_1);
14105  __pyx_r = __pyx_t_1;
14106  __pyx_t_1 = 0;
14107  goto __pyx_L0;
14108 
14109  /* function exit code */
14110  __pyx_L1_error:;
14111  __Pyx_XDECREF(__pyx_t_1);
14112  __Pyx_AddTraceback("cmeshTools.cmeshToolsComputeGeometricInfo_tetrahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
14113  __pyx_r = NULL;
14114  __pyx_L0:;
14115  __Pyx_XGIVEREF(__pyx_r);
14116  __Pyx_RefNannyFinishContext();
14117  return __pyx_r;
14118 }
14119 
14120 /* "cmeshTools.pyx":323
14121  *
14122  *
14123  * cpdef void generateFromTriangleFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14124  * unicode filebase,
14125  * int base):
14126  */
14127 
14128 static PyObject *__pyx_pw_10cmeshTools_11generateFromTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14129 static void __pyx_f_10cmeshTools_generateFromTriangleFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
14130  CYTHON_UNUSED int __pyx_v_failed;
14131  __Pyx_RefNannyDeclarations
14132  PyObject *__pyx_t_1 = NULL;
14133  char const *__pyx_t_2;
14134  char const *__pyx_t_3;
14135  __Pyx_RefNannySetupContext("generateFromTriangleFiles", 0);
14136 
14137  /* "cmeshTools.pyx":328
14138  *
14139  * cdef int failed
14140  * failed = cppm.readTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14141  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
14142  * failed = cppm.readTriangleElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14143  */
14144  if (unlikely(__pyx_v_filebase == Py_None)) {
14145  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14146  __PYX_ERR(1, 328, __pyx_L1_error)
14147  }
14148  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 328, __pyx_L1_error)
14149  __Pyx_GOTREF(__pyx_t_1);
14150  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 328, __pyx_L1_error)
14151  __pyx_v_failed = readTriangleMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
14152  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14153 
14154  /* "cmeshTools.pyx":329
14155  * cdef int failed
14156  * failed = cppm.readTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base);
14157  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
14158  * failed = cppm.readTriangleElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14159  *
14160  */
14161  (void)(constructElementBoundaryElementsArray_triangle(__pyx_v_cmesh->mesh));
14162 
14163  /* "cmeshTools.pyx":330
14164  * failed = cppm.readTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base);
14165  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
14166  * failed = cppm.readTriangleElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14167  *
14168  * cpdef void writeTriangleFiles(CMesh cmesh,
14169  */
14170  if (unlikely(__pyx_v_filebase == Py_None)) {
14171  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14172  __PYX_ERR(1, 330, __pyx_L1_error)
14173  }
14174  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 330, __pyx_L1_error)
14175  __Pyx_GOTREF(__pyx_t_1);
14176  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 330, __pyx_L1_error)
14177  __pyx_v_failed = readTriangleElementBoundaryMaterialTypes(__pyx_v_cmesh->mesh, __pyx_t_3, __pyx_v_base);
14178  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14179 
14180  /* "cmeshTools.pyx":323
14181  *
14182  *
14183  * cpdef void generateFromTriangleFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14184  * unicode filebase,
14185  * int base):
14186  */
14187 
14188  /* function exit code */
14189  goto __pyx_L0;
14190  __pyx_L1_error:;
14191  __Pyx_XDECREF(__pyx_t_1);
14192  __Pyx_WriteUnraisable("cmeshTools.generateFromTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
14193  __pyx_L0:;
14194  __Pyx_RefNannyFinishContext();
14195 }
14196 
14197 /* Python wrapper */
14198 static PyObject *__pyx_pw_10cmeshTools_11generateFromTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14199 static PyObject *__pyx_pw_10cmeshTools_11generateFromTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14200  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
14201  PyObject *__pyx_v_filebase = 0;
14202  int __pyx_v_base;
14203  PyObject *__pyx_r = 0;
14204  __Pyx_RefNannyDeclarations
14205  __Pyx_RefNannySetupContext("generateFromTriangleFiles (wrapper)", 0);
14206  {
14207  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
14208  PyObject* values[3] = {0,0,0};
14209  if (unlikely(__pyx_kwds)) {
14210  Py_ssize_t kw_args;
14211  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14212  switch (pos_args) {
14213  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14214  CYTHON_FALLTHROUGH;
14215  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14216  CYTHON_FALLTHROUGH;
14217  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14218  CYTHON_FALLTHROUGH;
14219  case 0: break;
14220  default: goto __pyx_L5_argtuple_error;
14221  }
14222  kw_args = PyDict_Size(__pyx_kwds);
14223  switch (pos_args) {
14224  case 0:
14225  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
14226  else goto __pyx_L5_argtuple_error;
14227  CYTHON_FALLTHROUGH;
14228  case 1:
14229  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
14230  else {
14231  __Pyx_RaiseArgtupleInvalid("generateFromTriangleFiles", 1, 3, 3, 1); __PYX_ERR(1, 323, __pyx_L3_error)
14232  }
14233  CYTHON_FALLTHROUGH;
14234  case 2:
14235  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
14236  else {
14237  __Pyx_RaiseArgtupleInvalid("generateFromTriangleFiles", 1, 3, 3, 2); __PYX_ERR(1, 323, __pyx_L3_error)
14238  }
14239  }
14240  if (unlikely(kw_args > 0)) {
14241  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFromTriangleFiles") < 0)) __PYX_ERR(1, 323, __pyx_L3_error)
14242  }
14243  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
14244  goto __pyx_L5_argtuple_error;
14245  } else {
14246  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14247  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14248  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14249  }
14250  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
14251  __pyx_v_filebase = ((PyObject*)values[1]);
14252  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 325, __pyx_L3_error)
14253  }
14254  goto __pyx_L4_argument_unpacking_done;
14255  __pyx_L5_argtuple_error:;
14256  __Pyx_RaiseArgtupleInvalid("generateFromTriangleFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 323, __pyx_L3_error)
14257  __pyx_L3_error:;
14258  __Pyx_AddTraceback("cmeshTools.generateFromTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14259  __Pyx_RefNannyFinishContext();
14260  return NULL;
14261  __pyx_L4_argument_unpacking_done:;
14262  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 323, __pyx_L1_error)
14263  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 324, __pyx_L1_error)
14264  __pyx_r = __pyx_pf_10cmeshTools_10generateFromTriangleFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
14265 
14266  /* function exit code */
14267  goto __pyx_L0;
14268  __pyx_L1_error:;
14269  __pyx_r = NULL;
14270  __pyx_L0:;
14271  __Pyx_RefNannyFinishContext();
14272  return __pyx_r;
14273 }
14274 
14275 static PyObject *__pyx_pf_10cmeshTools_10generateFromTriangleFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
14276  PyObject *__pyx_r = NULL;
14277  __Pyx_RefNannyDeclarations
14278  PyObject *__pyx_t_1 = NULL;
14279  __Pyx_RefNannySetupContext("generateFromTriangleFiles", 0);
14280  __Pyx_XDECREF(__pyx_r);
14281  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFromTriangleFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 323, __pyx_L1_error)
14282  __Pyx_GOTREF(__pyx_t_1);
14283  __pyx_r = __pyx_t_1;
14284  __pyx_t_1 = 0;
14285  goto __pyx_L0;
14286 
14287  /* function exit code */
14288  __pyx_L1_error:;
14289  __Pyx_XDECREF(__pyx_t_1);
14290  __Pyx_AddTraceback("cmeshTools.generateFromTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14291  __pyx_r = NULL;
14292  __pyx_L0:;
14293  __Pyx_XGIVEREF(__pyx_r);
14294  __Pyx_RefNannyFinishContext();
14295  return __pyx_r;
14296 }
14297 
14298 /* "cmeshTools.pyx":332
14299  * failed = cppm.readTriangleElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14300  *
14301  * cpdef void writeTriangleFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14302  * unicode filebase,
14303  * int base):
14304  */
14305 
14306 static PyObject *__pyx_pw_10cmeshTools_13writeTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14307 static void __pyx_f_10cmeshTools_writeTriangleFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
14308  CYTHON_UNUSED int __pyx_v_failed;
14309  __Pyx_RefNannyDeclarations
14310  PyObject *__pyx_t_1 = NULL;
14311  char const *__pyx_t_2;
14312  __Pyx_RefNannySetupContext("writeTriangleFiles", 0);
14313 
14314  /* "cmeshTools.pyx":336
14315  * int base):
14316  * cdef int failed
14317  * failed = cppm.writeTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14318  *
14319  * cpdef void generateFromTetgenFiles(CMesh cmesh,
14320  */
14321  if (unlikely(__pyx_v_filebase == Py_None)) {
14322  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14323  __PYX_ERR(1, 336, __pyx_L1_error)
14324  }
14325  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 336, __pyx_L1_error)
14326  __Pyx_GOTREF(__pyx_t_1);
14327  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 336, __pyx_L1_error)
14328  __pyx_v_failed = writeTriangleMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
14329  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14330 
14331  /* "cmeshTools.pyx":332
14332  * failed = cppm.readTriangleElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14333  *
14334  * cpdef void writeTriangleFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14335  * unicode filebase,
14336  * int base):
14337  */
14338 
14339  /* function exit code */
14340  goto __pyx_L0;
14341  __pyx_L1_error:;
14342  __Pyx_XDECREF(__pyx_t_1);
14343  __Pyx_WriteUnraisable("cmeshTools.writeTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
14344  __pyx_L0:;
14345  __Pyx_RefNannyFinishContext();
14346 }
14347 
14348 /* Python wrapper */
14349 static PyObject *__pyx_pw_10cmeshTools_13writeTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14350 static PyObject *__pyx_pw_10cmeshTools_13writeTriangleFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14351  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
14352  PyObject *__pyx_v_filebase = 0;
14353  int __pyx_v_base;
14354  PyObject *__pyx_r = 0;
14355  __Pyx_RefNannyDeclarations
14356  __Pyx_RefNannySetupContext("writeTriangleFiles (wrapper)", 0);
14357  {
14358  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
14359  PyObject* values[3] = {0,0,0};
14360  if (unlikely(__pyx_kwds)) {
14361  Py_ssize_t kw_args;
14362  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14363  switch (pos_args) {
14364  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14365  CYTHON_FALLTHROUGH;
14366  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14367  CYTHON_FALLTHROUGH;
14368  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14369  CYTHON_FALLTHROUGH;
14370  case 0: break;
14371  default: goto __pyx_L5_argtuple_error;
14372  }
14373  kw_args = PyDict_Size(__pyx_kwds);
14374  switch (pos_args) {
14375  case 0:
14376  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
14377  else goto __pyx_L5_argtuple_error;
14378  CYTHON_FALLTHROUGH;
14379  case 1:
14380  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
14381  else {
14382  __Pyx_RaiseArgtupleInvalid("writeTriangleFiles", 1, 3, 3, 1); __PYX_ERR(1, 332, __pyx_L3_error)
14383  }
14384  CYTHON_FALLTHROUGH;
14385  case 2:
14386  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
14387  else {
14388  __Pyx_RaiseArgtupleInvalid("writeTriangleFiles", 1, 3, 3, 2); __PYX_ERR(1, 332, __pyx_L3_error)
14389  }
14390  }
14391  if (unlikely(kw_args > 0)) {
14392  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeTriangleFiles") < 0)) __PYX_ERR(1, 332, __pyx_L3_error)
14393  }
14394  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
14395  goto __pyx_L5_argtuple_error;
14396  } else {
14397  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14398  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14399  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14400  }
14401  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
14402  __pyx_v_filebase = ((PyObject*)values[1]);
14403  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 334, __pyx_L3_error)
14404  }
14405  goto __pyx_L4_argument_unpacking_done;
14406  __pyx_L5_argtuple_error:;
14407  __Pyx_RaiseArgtupleInvalid("writeTriangleFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 332, __pyx_L3_error)
14408  __pyx_L3_error:;
14409  __Pyx_AddTraceback("cmeshTools.writeTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14410  __Pyx_RefNannyFinishContext();
14411  return NULL;
14412  __pyx_L4_argument_unpacking_done:;
14413  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 332, __pyx_L1_error)
14414  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 333, __pyx_L1_error)
14415  __pyx_r = __pyx_pf_10cmeshTools_12writeTriangleFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
14416 
14417  /* function exit code */
14418  goto __pyx_L0;
14419  __pyx_L1_error:;
14420  __pyx_r = NULL;
14421  __pyx_L0:;
14422  __Pyx_RefNannyFinishContext();
14423  return __pyx_r;
14424 }
14425 
14426 static PyObject *__pyx_pf_10cmeshTools_12writeTriangleFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
14427  PyObject *__pyx_r = NULL;
14428  __Pyx_RefNannyDeclarations
14429  PyObject *__pyx_t_1 = NULL;
14430  __Pyx_RefNannySetupContext("writeTriangleFiles", 0);
14431  __Pyx_XDECREF(__pyx_r);
14432  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_writeTriangleFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 332, __pyx_L1_error)
14433  __Pyx_GOTREF(__pyx_t_1);
14434  __pyx_r = __pyx_t_1;
14435  __pyx_t_1 = 0;
14436  goto __pyx_L0;
14437 
14438  /* function exit code */
14439  __pyx_L1_error:;
14440  __Pyx_XDECREF(__pyx_t_1);
14441  __Pyx_AddTraceback("cmeshTools.writeTriangleFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14442  __pyx_r = NULL;
14443  __pyx_L0:;
14444  __Pyx_XGIVEREF(__pyx_r);
14445  __Pyx_RefNannyFinishContext();
14446  return __pyx_r;
14447 }
14448 
14449 /* "cmeshTools.pyx":338
14450  * failed = cppm.writeTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base);
14451  *
14452  * cpdef void generateFromTetgenFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14453  * unicode filebase,
14454  * int base):
14455  */
14456 
14457 static PyObject *__pyx_pw_10cmeshTools_15generateFromTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14458 static void __pyx_f_10cmeshTools_generateFromTetgenFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
14459  CYTHON_UNUSED int __pyx_v_failed;
14460  __Pyx_RefNannyDeclarations
14461  PyObject *__pyx_t_1 = NULL;
14462  char const *__pyx_t_2;
14463  char const *__pyx_t_3;
14464  __Pyx_RefNannySetupContext("generateFromTetgenFiles", 0);
14465 
14466  /* "cmeshTools.pyx":342
14467  * int base):
14468  * cdef int failed
14469  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14470  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
14471  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14472  */
14473  if (unlikely(__pyx_v_filebase == Py_None)) {
14474  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14475  __PYX_ERR(1, 342, __pyx_L1_error)
14476  }
14477  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 342, __pyx_L1_error)
14478  __Pyx_GOTREF(__pyx_t_1);
14479  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 342, __pyx_L1_error)
14480  __pyx_v_failed = readTetgenMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
14481  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14482 
14483  /* "cmeshTools.pyx":343
14484  * cdef int failed
14485  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
14486  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
14487  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14488  *
14489  */
14490  (void)(constructElementBoundaryElementsArray_tetrahedron(__pyx_v_cmesh->mesh));
14491 
14492  /* "cmeshTools.pyx":344
14493  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
14494  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
14495  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14496  *
14497  * cpdef void generateFromTetgenFilesParallel(CMesh cmesh,
14498  */
14499  if (unlikely(__pyx_v_filebase == Py_None)) {
14500  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14501  __PYX_ERR(1, 344, __pyx_L1_error)
14502  }
14503  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 344, __pyx_L1_error)
14504  __Pyx_GOTREF(__pyx_t_1);
14505  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 344, __pyx_L1_error)
14506  __pyx_v_failed = readTetgenElementBoundaryMaterialTypes(__pyx_v_cmesh->mesh, __pyx_t_3, __pyx_v_base);
14507  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14508 
14509  /* "cmeshTools.pyx":338
14510  * failed = cppm.writeTriangleMesh(cmesh.mesh,filebase.encode('utf8'),base);
14511  *
14512  * cpdef void generateFromTetgenFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14513  * unicode filebase,
14514  * int base):
14515  */
14516 
14517  /* function exit code */
14518  goto __pyx_L0;
14519  __pyx_L1_error:;
14520  __Pyx_XDECREF(__pyx_t_1);
14521  __Pyx_WriteUnraisable("cmeshTools.generateFromTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
14522  __pyx_L0:;
14523  __Pyx_RefNannyFinishContext();
14524 }
14525 
14526 /* Python wrapper */
14527 static PyObject *__pyx_pw_10cmeshTools_15generateFromTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14528 static PyObject *__pyx_pw_10cmeshTools_15generateFromTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14529  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
14530  PyObject *__pyx_v_filebase = 0;
14531  int __pyx_v_base;
14532  PyObject *__pyx_r = 0;
14533  __Pyx_RefNannyDeclarations
14534  __Pyx_RefNannySetupContext("generateFromTetgenFiles (wrapper)", 0);
14535  {
14536  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
14537  PyObject* values[3] = {0,0,0};
14538  if (unlikely(__pyx_kwds)) {
14539  Py_ssize_t kw_args;
14540  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14541  switch (pos_args) {
14542  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14543  CYTHON_FALLTHROUGH;
14544  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14545  CYTHON_FALLTHROUGH;
14546  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14547  CYTHON_FALLTHROUGH;
14548  case 0: break;
14549  default: goto __pyx_L5_argtuple_error;
14550  }
14551  kw_args = PyDict_Size(__pyx_kwds);
14552  switch (pos_args) {
14553  case 0:
14554  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
14555  else goto __pyx_L5_argtuple_error;
14556  CYTHON_FALLTHROUGH;
14557  case 1:
14558  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
14559  else {
14560  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFiles", 1, 3, 3, 1); __PYX_ERR(1, 338, __pyx_L3_error)
14561  }
14562  CYTHON_FALLTHROUGH;
14563  case 2:
14564  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
14565  else {
14566  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFiles", 1, 3, 3, 2); __PYX_ERR(1, 338, __pyx_L3_error)
14567  }
14568  }
14569  if (unlikely(kw_args > 0)) {
14570  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFromTetgenFiles") < 0)) __PYX_ERR(1, 338, __pyx_L3_error)
14571  }
14572  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
14573  goto __pyx_L5_argtuple_error;
14574  } else {
14575  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14576  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14577  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14578  }
14579  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
14580  __pyx_v_filebase = ((PyObject*)values[1]);
14581  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 340, __pyx_L3_error)
14582  }
14583  goto __pyx_L4_argument_unpacking_done;
14584  __pyx_L5_argtuple_error:;
14585  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 338, __pyx_L3_error)
14586  __pyx_L3_error:;
14587  __Pyx_AddTraceback("cmeshTools.generateFromTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14588  __Pyx_RefNannyFinishContext();
14589  return NULL;
14590  __pyx_L4_argument_unpacking_done:;
14591  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 338, __pyx_L1_error)
14592  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 339, __pyx_L1_error)
14593  __pyx_r = __pyx_pf_10cmeshTools_14generateFromTetgenFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
14594 
14595  /* function exit code */
14596  goto __pyx_L0;
14597  __pyx_L1_error:;
14598  __pyx_r = NULL;
14599  __pyx_L0:;
14600  __Pyx_RefNannyFinishContext();
14601  return __pyx_r;
14602 }
14603 
14604 static PyObject *__pyx_pf_10cmeshTools_14generateFromTetgenFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
14605  PyObject *__pyx_r = NULL;
14606  __Pyx_RefNannyDeclarations
14607  PyObject *__pyx_t_1 = NULL;
14608  __Pyx_RefNannySetupContext("generateFromTetgenFiles", 0);
14609  __Pyx_XDECREF(__pyx_r);
14610  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFromTetgenFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 338, __pyx_L1_error)
14611  __Pyx_GOTREF(__pyx_t_1);
14612  __pyx_r = __pyx_t_1;
14613  __pyx_t_1 = 0;
14614  goto __pyx_L0;
14615 
14616  /* function exit code */
14617  __pyx_L1_error:;
14618  __Pyx_XDECREF(__pyx_t_1);
14619  __Pyx_AddTraceback("cmeshTools.generateFromTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14620  __pyx_r = NULL;
14621  __pyx_L0:;
14622  __Pyx_XGIVEREF(__pyx_r);
14623  __Pyx_RefNannyFinishContext();
14624  return __pyx_r;
14625 }
14626 
14627 /* "cmeshTools.pyx":346
14628  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14629  *
14630  * cpdef void generateFromTetgenFilesParallel(CMesh cmesh, # <<<<<<<<<<<<<<
14631  * unicode filebase,
14632  * int base):
14633  */
14634 
14635 static PyObject *__pyx_pw_10cmeshTools_17generateFromTetgenFilesParallel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14636 static void __pyx_f_10cmeshTools_generateFromTetgenFilesParallel(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
14637  CYTHON_UNUSED int __pyx_v_failed;
14638  __Pyx_RefNannyDeclarations
14639  PyObject *__pyx_t_1 = NULL;
14640  char const *__pyx_t_2;
14641  char const *__pyx_t_3;
14642  __Pyx_RefNannySetupContext("generateFromTetgenFilesParallel", 0);
14643 
14644  /* "cmeshTools.pyx":350
14645  * int base):
14646  * cdef int failed
14647  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14648  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
14649  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14650  */
14651  if (unlikely(__pyx_v_filebase == Py_None)) {
14652  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14653  __PYX_ERR(1, 350, __pyx_L1_error)
14654  }
14655  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 350, __pyx_L1_error)
14656  __Pyx_GOTREF(__pyx_t_1);
14657  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 350, __pyx_L1_error)
14658  __pyx_v_failed = readTetgenMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
14659  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14660 
14661  /* "cmeshTools.pyx":351
14662  * cdef int failed
14663  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
14664  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
14665  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14666  *
14667  */
14668  (void)(constructElementBoundaryElementsArray_tetrahedron(__pyx_v_cmesh->mesh));
14669 
14670  /* "cmeshTools.pyx":352
14671  * failed = cppm.readTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
14672  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
14673  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14674  *
14675  * cpdef void writeTetgenFiles(CMesh cmesh,
14676  */
14677  if (unlikely(__pyx_v_filebase == Py_None)) {
14678  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14679  __PYX_ERR(1, 352, __pyx_L1_error)
14680  }
14681  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 352, __pyx_L1_error)
14682  __Pyx_GOTREF(__pyx_t_1);
14683  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 352, __pyx_L1_error)
14684  __pyx_v_failed = readTetgenElementBoundaryMaterialTypes(__pyx_v_cmesh->mesh, __pyx_t_3, __pyx_v_base);
14685  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14686 
14687  /* "cmeshTools.pyx":346
14688  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14689  *
14690  * cpdef void generateFromTetgenFilesParallel(CMesh cmesh, # <<<<<<<<<<<<<<
14691  * unicode filebase,
14692  * int base):
14693  */
14694 
14695  /* function exit code */
14696  goto __pyx_L0;
14697  __pyx_L1_error:;
14698  __Pyx_XDECREF(__pyx_t_1);
14699  __Pyx_WriteUnraisable("cmeshTools.generateFromTetgenFilesParallel", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
14700  __pyx_L0:;
14701  __Pyx_RefNannyFinishContext();
14702 }
14703 
14704 /* Python wrapper */
14705 static PyObject *__pyx_pw_10cmeshTools_17generateFromTetgenFilesParallel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14706 static PyObject *__pyx_pw_10cmeshTools_17generateFromTetgenFilesParallel(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14707  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
14708  PyObject *__pyx_v_filebase = 0;
14709  int __pyx_v_base;
14710  PyObject *__pyx_r = 0;
14711  __Pyx_RefNannyDeclarations
14712  __Pyx_RefNannySetupContext("generateFromTetgenFilesParallel (wrapper)", 0);
14713  {
14714  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
14715  PyObject* values[3] = {0,0,0};
14716  if (unlikely(__pyx_kwds)) {
14717  Py_ssize_t kw_args;
14718  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14719  switch (pos_args) {
14720  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14721  CYTHON_FALLTHROUGH;
14722  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14723  CYTHON_FALLTHROUGH;
14724  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14725  CYTHON_FALLTHROUGH;
14726  case 0: break;
14727  default: goto __pyx_L5_argtuple_error;
14728  }
14729  kw_args = PyDict_Size(__pyx_kwds);
14730  switch (pos_args) {
14731  case 0:
14732  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
14733  else goto __pyx_L5_argtuple_error;
14734  CYTHON_FALLTHROUGH;
14735  case 1:
14736  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
14737  else {
14738  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFilesParallel", 1, 3, 3, 1); __PYX_ERR(1, 346, __pyx_L3_error)
14739  }
14740  CYTHON_FALLTHROUGH;
14741  case 2:
14742  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
14743  else {
14744  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFilesParallel", 1, 3, 3, 2); __PYX_ERR(1, 346, __pyx_L3_error)
14745  }
14746  }
14747  if (unlikely(kw_args > 0)) {
14748  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFromTetgenFilesParallel") < 0)) __PYX_ERR(1, 346, __pyx_L3_error)
14749  }
14750  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
14751  goto __pyx_L5_argtuple_error;
14752  } else {
14753  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14754  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14755  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14756  }
14757  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
14758  __pyx_v_filebase = ((PyObject*)values[1]);
14759  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 348, __pyx_L3_error)
14760  }
14761  goto __pyx_L4_argument_unpacking_done;
14762  __pyx_L5_argtuple_error:;
14763  __Pyx_RaiseArgtupleInvalid("generateFromTetgenFilesParallel", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 346, __pyx_L3_error)
14764  __pyx_L3_error:;
14765  __Pyx_AddTraceback("cmeshTools.generateFromTetgenFilesParallel", __pyx_clineno, __pyx_lineno, __pyx_filename);
14766  __Pyx_RefNannyFinishContext();
14767  return NULL;
14768  __pyx_L4_argument_unpacking_done:;
14769  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 346, __pyx_L1_error)
14770  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 347, __pyx_L1_error)
14771  __pyx_r = __pyx_pf_10cmeshTools_16generateFromTetgenFilesParallel(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
14772 
14773  /* function exit code */
14774  goto __pyx_L0;
14775  __pyx_L1_error:;
14776  __pyx_r = NULL;
14777  __pyx_L0:;
14778  __Pyx_RefNannyFinishContext();
14779  return __pyx_r;
14780 }
14781 
14782 static PyObject *__pyx_pf_10cmeshTools_16generateFromTetgenFilesParallel(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
14783  PyObject *__pyx_r = NULL;
14784  __Pyx_RefNannyDeclarations
14785  PyObject *__pyx_t_1 = NULL;
14786  __Pyx_RefNannySetupContext("generateFromTetgenFilesParallel", 0);
14787  __Pyx_XDECREF(__pyx_r);
14788  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFromTetgenFilesParallel(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 346, __pyx_L1_error)
14789  __Pyx_GOTREF(__pyx_t_1);
14790  __pyx_r = __pyx_t_1;
14791  __pyx_t_1 = 0;
14792  goto __pyx_L0;
14793 
14794  /* function exit code */
14795  __pyx_L1_error:;
14796  __Pyx_XDECREF(__pyx_t_1);
14797  __Pyx_AddTraceback("cmeshTools.generateFromTetgenFilesParallel", __pyx_clineno, __pyx_lineno, __pyx_filename);
14798  __pyx_r = NULL;
14799  __pyx_L0:;
14800  __Pyx_XGIVEREF(__pyx_r);
14801  __Pyx_RefNannyFinishContext();
14802  return __pyx_r;
14803 }
14804 
14805 /* "cmeshTools.pyx":354
14806  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14807  *
14808  * cpdef void writeTetgenFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14809  * unicode filebase,
14810  * int base):
14811  */
14812 
14813 static PyObject *__pyx_pw_10cmeshTools_19writeTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14814 static void __pyx_f_10cmeshTools_writeTetgenFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
14815  CYTHON_UNUSED int __pyx_v_failed;
14816  __Pyx_RefNannyDeclarations
14817  PyObject *__pyx_t_1 = NULL;
14818  char const *__pyx_t_2;
14819  __Pyx_RefNannySetupContext("writeTetgenFiles", 0);
14820 
14821  /* "cmeshTools.pyx":358
14822  * int base):
14823  * cdef int failed
14824  * failed = cppm.writeTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14825  *
14826  * cpdef void write3dmFiles(CMesh cmesh,
14827  */
14828  if (unlikely(__pyx_v_filebase == Py_None)) {
14829  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14830  __PYX_ERR(1, 358, __pyx_L1_error)
14831  }
14832  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 358, __pyx_L1_error)
14833  __Pyx_GOTREF(__pyx_t_1);
14834  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 358, __pyx_L1_error)
14835  __pyx_v_failed = writeTetgenMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
14836  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14837 
14838  /* "cmeshTools.pyx":354
14839  * failed = cppm.readTetgenElementBoundaryMaterialTypes(cmesh.mesh,filebase.encode('utf8'),base);
14840  *
14841  * cpdef void writeTetgenFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14842  * unicode filebase,
14843  * int base):
14844  */
14845 
14846  /* function exit code */
14847  goto __pyx_L0;
14848  __pyx_L1_error:;
14849  __Pyx_XDECREF(__pyx_t_1);
14850  __Pyx_WriteUnraisable("cmeshTools.writeTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
14851  __pyx_L0:;
14852  __Pyx_RefNannyFinishContext();
14853 }
14854 
14855 /* Python wrapper */
14856 static PyObject *__pyx_pw_10cmeshTools_19writeTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14857 static PyObject *__pyx_pw_10cmeshTools_19writeTetgenFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
14858  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
14859  PyObject *__pyx_v_filebase = 0;
14860  int __pyx_v_base;
14861  PyObject *__pyx_r = 0;
14862  __Pyx_RefNannyDeclarations
14863  __Pyx_RefNannySetupContext("writeTetgenFiles (wrapper)", 0);
14864  {
14865  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
14866  PyObject* values[3] = {0,0,0};
14867  if (unlikely(__pyx_kwds)) {
14868  Py_ssize_t kw_args;
14869  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
14870  switch (pos_args) {
14871  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14872  CYTHON_FALLTHROUGH;
14873  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14874  CYTHON_FALLTHROUGH;
14875  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14876  CYTHON_FALLTHROUGH;
14877  case 0: break;
14878  default: goto __pyx_L5_argtuple_error;
14879  }
14880  kw_args = PyDict_Size(__pyx_kwds);
14881  switch (pos_args) {
14882  case 0:
14883  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
14884  else goto __pyx_L5_argtuple_error;
14885  CYTHON_FALLTHROUGH;
14886  case 1:
14887  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
14888  else {
14889  __Pyx_RaiseArgtupleInvalid("writeTetgenFiles", 1, 3, 3, 1); __PYX_ERR(1, 354, __pyx_L3_error)
14890  }
14891  CYTHON_FALLTHROUGH;
14892  case 2:
14893  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
14894  else {
14895  __Pyx_RaiseArgtupleInvalid("writeTetgenFiles", 1, 3, 3, 2); __PYX_ERR(1, 354, __pyx_L3_error)
14896  }
14897  }
14898  if (unlikely(kw_args > 0)) {
14899  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "writeTetgenFiles") < 0)) __PYX_ERR(1, 354, __pyx_L3_error)
14900  }
14901  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
14902  goto __pyx_L5_argtuple_error;
14903  } else {
14904  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
14905  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
14906  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
14907  }
14908  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
14909  __pyx_v_filebase = ((PyObject*)values[1]);
14910  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 356, __pyx_L3_error)
14911  }
14912  goto __pyx_L4_argument_unpacking_done;
14913  __pyx_L5_argtuple_error:;
14914  __Pyx_RaiseArgtupleInvalid("writeTetgenFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 354, __pyx_L3_error)
14915  __pyx_L3_error:;
14916  __Pyx_AddTraceback("cmeshTools.writeTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14917  __Pyx_RefNannyFinishContext();
14918  return NULL;
14919  __pyx_L4_argument_unpacking_done:;
14920  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 354, __pyx_L1_error)
14921  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 355, __pyx_L1_error)
14922  __pyx_r = __pyx_pf_10cmeshTools_18writeTetgenFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
14923 
14924  /* function exit code */
14925  goto __pyx_L0;
14926  __pyx_L1_error:;
14927  __pyx_r = NULL;
14928  __pyx_L0:;
14929  __Pyx_RefNannyFinishContext();
14930  return __pyx_r;
14931 }
14932 
14933 static PyObject *__pyx_pf_10cmeshTools_18writeTetgenFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
14934  PyObject *__pyx_r = NULL;
14935  __Pyx_RefNannyDeclarations
14936  PyObject *__pyx_t_1 = NULL;
14937  __Pyx_RefNannySetupContext("writeTetgenFiles", 0);
14938  __Pyx_XDECREF(__pyx_r);
14939  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_writeTetgenFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 354, __pyx_L1_error)
14940  __Pyx_GOTREF(__pyx_t_1);
14941  __pyx_r = __pyx_t_1;
14942  __pyx_t_1 = 0;
14943  goto __pyx_L0;
14944 
14945  /* function exit code */
14946  __pyx_L1_error:;
14947  __Pyx_XDECREF(__pyx_t_1);
14948  __Pyx_AddTraceback("cmeshTools.writeTetgenFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
14949  __pyx_r = NULL;
14950  __pyx_L0:;
14951  __Pyx_XGIVEREF(__pyx_r);
14952  __Pyx_RefNannyFinishContext();
14953  return __pyx_r;
14954 }
14955 
14956 /* "cmeshTools.pyx":360
14957  * failed = cppm.writeTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
14958  *
14959  * cpdef void write3dmFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14960  * unicode filebase,
14961  * int base):
14962  */
14963 
14964 static PyObject *__pyx_pw_10cmeshTools_21write3dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
14965 static void __pyx_f_10cmeshTools_write3dmFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
14966  CYTHON_UNUSED int __pyx_v_failed;
14967  __Pyx_RefNannyDeclarations
14968  PyObject *__pyx_t_1 = NULL;
14969  char const *__pyx_t_2;
14970  __Pyx_RefNannySetupContext("write3dmFiles", 0);
14971 
14972  /* "cmeshTools.pyx":364
14973  * int base):
14974  * cdef int failed
14975  * failed = cppm.write3dmMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
14976  *
14977  * cpdef void write2dmFiles(CMesh cmesh,
14978  */
14979  if (unlikely(__pyx_v_filebase == Py_None)) {
14980  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
14981  __PYX_ERR(1, 364, __pyx_L1_error)
14982  }
14983  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 364, __pyx_L1_error)
14984  __Pyx_GOTREF(__pyx_t_1);
14985  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 364, __pyx_L1_error)
14986  __pyx_v_failed = write3dmMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
14987  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
14988 
14989  /* "cmeshTools.pyx":360
14990  * failed = cppm.writeTetgenMesh(cmesh.mesh,filebase.encode('utf8'),base);
14991  *
14992  * cpdef void write3dmFiles(CMesh cmesh, # <<<<<<<<<<<<<<
14993  * unicode filebase,
14994  * int base):
14995  */
14996 
14997  /* function exit code */
14998  goto __pyx_L0;
14999  __pyx_L1_error:;
15000  __Pyx_XDECREF(__pyx_t_1);
15001  __Pyx_WriteUnraisable("cmeshTools.write3dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15002  __pyx_L0:;
15003  __Pyx_RefNannyFinishContext();
15004 }
15005 
15006 /* Python wrapper */
15007 static PyObject *__pyx_pw_10cmeshTools_21write3dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15008 static PyObject *__pyx_pw_10cmeshTools_21write3dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15009  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15010  PyObject *__pyx_v_filebase = 0;
15011  int __pyx_v_base;
15012  PyObject *__pyx_r = 0;
15013  __Pyx_RefNannyDeclarations
15014  __Pyx_RefNannySetupContext("write3dmFiles (wrapper)", 0);
15015  {
15016  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
15017  PyObject* values[3] = {0,0,0};
15018  if (unlikely(__pyx_kwds)) {
15019  Py_ssize_t kw_args;
15020  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15021  switch (pos_args) {
15022  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15023  CYTHON_FALLTHROUGH;
15024  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15025  CYTHON_FALLTHROUGH;
15026  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15027  CYTHON_FALLTHROUGH;
15028  case 0: break;
15029  default: goto __pyx_L5_argtuple_error;
15030  }
15031  kw_args = PyDict_Size(__pyx_kwds);
15032  switch (pos_args) {
15033  case 0:
15034  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15035  else goto __pyx_L5_argtuple_error;
15036  CYTHON_FALLTHROUGH;
15037  case 1:
15038  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
15039  else {
15040  __Pyx_RaiseArgtupleInvalid("write3dmFiles", 1, 3, 3, 1); __PYX_ERR(1, 360, __pyx_L3_error)
15041  }
15042  CYTHON_FALLTHROUGH;
15043  case 2:
15044  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15045  else {
15046  __Pyx_RaiseArgtupleInvalid("write3dmFiles", 1, 3, 3, 2); __PYX_ERR(1, 360, __pyx_L3_error)
15047  }
15048  }
15049  if (unlikely(kw_args > 0)) {
15050  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write3dmFiles") < 0)) __PYX_ERR(1, 360, __pyx_L3_error)
15051  }
15052  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15053  goto __pyx_L5_argtuple_error;
15054  } else {
15055  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15056  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15057  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15058  }
15059  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15060  __pyx_v_filebase = ((PyObject*)values[1]);
15061  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 362, __pyx_L3_error)
15062  }
15063  goto __pyx_L4_argument_unpacking_done;
15064  __pyx_L5_argtuple_error:;
15065  __Pyx_RaiseArgtupleInvalid("write3dmFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 360, __pyx_L3_error)
15066  __pyx_L3_error:;
15067  __Pyx_AddTraceback("cmeshTools.write3dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15068  __Pyx_RefNannyFinishContext();
15069  return NULL;
15070  __pyx_L4_argument_unpacking_done:;
15071  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 360, __pyx_L1_error)
15072  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 361, __pyx_L1_error)
15073  __pyx_r = __pyx_pf_10cmeshTools_20write3dmFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15074 
15075  /* function exit code */
15076  goto __pyx_L0;
15077  __pyx_L1_error:;
15078  __pyx_r = NULL;
15079  __pyx_L0:;
15080  __Pyx_RefNannyFinishContext();
15081  return __pyx_r;
15082 }
15083 
15084 static PyObject *__pyx_pf_10cmeshTools_20write3dmFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15085  PyObject *__pyx_r = NULL;
15086  __Pyx_RefNannyDeclarations
15087  PyObject *__pyx_t_1 = NULL;
15088  __Pyx_RefNannySetupContext("write3dmFiles", 0);
15089  __Pyx_XDECREF(__pyx_r);
15090  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_write3dmFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 360, __pyx_L1_error)
15091  __Pyx_GOTREF(__pyx_t_1);
15092  __pyx_r = __pyx_t_1;
15093  __pyx_t_1 = 0;
15094  goto __pyx_L0;
15095 
15096  /* function exit code */
15097  __pyx_L1_error:;
15098  __Pyx_XDECREF(__pyx_t_1);
15099  __Pyx_AddTraceback("cmeshTools.write3dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15100  __pyx_r = NULL;
15101  __pyx_L0:;
15102  __Pyx_XGIVEREF(__pyx_r);
15103  __Pyx_RefNannyFinishContext();
15104  return __pyx_r;
15105 }
15106 
15107 /* "cmeshTools.pyx":366
15108  * failed = cppm.write3dmMesh(cmesh.mesh,filebase.encode('utf8'),base);
15109  *
15110  * cpdef void write2dmFiles(CMesh cmesh, # <<<<<<<<<<<<<<
15111  * unicode filebase,
15112  * int base):
15113  */
15114 
15115 static PyObject *__pyx_pw_10cmeshTools_23write2dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15116 static void __pyx_f_10cmeshTools_write2dmFiles(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
15117  CYTHON_UNUSED int __pyx_v_failed;
15118  __Pyx_RefNannyDeclarations
15119  PyObject *__pyx_t_1 = NULL;
15120  char const *__pyx_t_2;
15121  __Pyx_RefNannySetupContext("write2dmFiles", 0);
15122 
15123  /* "cmeshTools.pyx":370
15124  * int base):
15125  * cdef int failed
15126  * failed = cppm.write2dmMesh(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15127  *
15128  * cpdef void generateFromHexFile(CMesh cmesh,
15129  */
15130  if (unlikely(__pyx_v_filebase == Py_None)) {
15131  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15132  __PYX_ERR(1, 370, __pyx_L1_error)
15133  }
15134  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 370, __pyx_L1_error)
15135  __Pyx_GOTREF(__pyx_t_1);
15136  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 370, __pyx_L1_error)
15137  __pyx_v_failed = write2dmMesh(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
15138  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15139 
15140  /* "cmeshTools.pyx":366
15141  * failed = cppm.write3dmMesh(cmesh.mesh,filebase.encode('utf8'),base);
15142  *
15143  * cpdef void write2dmFiles(CMesh cmesh, # <<<<<<<<<<<<<<
15144  * unicode filebase,
15145  * int base):
15146  */
15147 
15148  /* function exit code */
15149  goto __pyx_L0;
15150  __pyx_L1_error:;
15151  __Pyx_XDECREF(__pyx_t_1);
15152  __Pyx_WriteUnraisable("cmeshTools.write2dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15153  __pyx_L0:;
15154  __Pyx_RefNannyFinishContext();
15155 }
15156 
15157 /* Python wrapper */
15158 static PyObject *__pyx_pw_10cmeshTools_23write2dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15159 static PyObject *__pyx_pw_10cmeshTools_23write2dmFiles(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15160  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15161  PyObject *__pyx_v_filebase = 0;
15162  int __pyx_v_base;
15163  PyObject *__pyx_r = 0;
15164  __Pyx_RefNannyDeclarations
15165  __Pyx_RefNannySetupContext("write2dmFiles (wrapper)", 0);
15166  {
15167  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
15168  PyObject* values[3] = {0,0,0};
15169  if (unlikely(__pyx_kwds)) {
15170  Py_ssize_t kw_args;
15171  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15172  switch (pos_args) {
15173  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15174  CYTHON_FALLTHROUGH;
15175  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15176  CYTHON_FALLTHROUGH;
15177  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15178  CYTHON_FALLTHROUGH;
15179  case 0: break;
15180  default: goto __pyx_L5_argtuple_error;
15181  }
15182  kw_args = PyDict_Size(__pyx_kwds);
15183  switch (pos_args) {
15184  case 0:
15185  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15186  else goto __pyx_L5_argtuple_error;
15187  CYTHON_FALLTHROUGH;
15188  case 1:
15189  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
15190  else {
15191  __Pyx_RaiseArgtupleInvalid("write2dmFiles", 1, 3, 3, 1); __PYX_ERR(1, 366, __pyx_L3_error)
15192  }
15193  CYTHON_FALLTHROUGH;
15194  case 2:
15195  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15196  else {
15197  __Pyx_RaiseArgtupleInvalid("write2dmFiles", 1, 3, 3, 2); __PYX_ERR(1, 366, __pyx_L3_error)
15198  }
15199  }
15200  if (unlikely(kw_args > 0)) {
15201  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write2dmFiles") < 0)) __PYX_ERR(1, 366, __pyx_L3_error)
15202  }
15203  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15204  goto __pyx_L5_argtuple_error;
15205  } else {
15206  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15207  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15208  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15209  }
15210  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15211  __pyx_v_filebase = ((PyObject*)values[1]);
15212  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 368, __pyx_L3_error)
15213  }
15214  goto __pyx_L4_argument_unpacking_done;
15215  __pyx_L5_argtuple_error:;
15216  __Pyx_RaiseArgtupleInvalid("write2dmFiles", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 366, __pyx_L3_error)
15217  __pyx_L3_error:;
15218  __Pyx_AddTraceback("cmeshTools.write2dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15219  __Pyx_RefNannyFinishContext();
15220  return NULL;
15221  __pyx_L4_argument_unpacking_done:;
15222  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 366, __pyx_L1_error)
15223  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 367, __pyx_L1_error)
15224  __pyx_r = __pyx_pf_10cmeshTools_22write2dmFiles(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15225 
15226  /* function exit code */
15227  goto __pyx_L0;
15228  __pyx_L1_error:;
15229  __pyx_r = NULL;
15230  __pyx_L0:;
15231  __Pyx_RefNannyFinishContext();
15232  return __pyx_r;
15233 }
15234 
15235 static PyObject *__pyx_pf_10cmeshTools_22write2dmFiles(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15236  PyObject *__pyx_r = NULL;
15237  __Pyx_RefNannyDeclarations
15238  PyObject *__pyx_t_1 = NULL;
15239  __Pyx_RefNannySetupContext("write2dmFiles", 0);
15240  __Pyx_XDECREF(__pyx_r);
15241  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_write2dmFiles(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 366, __pyx_L1_error)
15242  __Pyx_GOTREF(__pyx_t_1);
15243  __pyx_r = __pyx_t_1;
15244  __pyx_t_1 = 0;
15245  goto __pyx_L0;
15246 
15247  /* function exit code */
15248  __pyx_L1_error:;
15249  __Pyx_XDECREF(__pyx_t_1);
15250  __Pyx_AddTraceback("cmeshTools.write2dmFiles", __pyx_clineno, __pyx_lineno, __pyx_filename);
15251  __pyx_r = NULL;
15252  __pyx_L0:;
15253  __Pyx_XGIVEREF(__pyx_r);
15254  __Pyx_RefNannyFinishContext();
15255  return __pyx_r;
15256 }
15257 
15258 /* "cmeshTools.pyx":372
15259  * failed = cppm.write2dmMesh(cmesh.mesh,filebase.encode('utf8'),base);
15260  *
15261  * cpdef void generateFromHexFile(CMesh cmesh, # <<<<<<<<<<<<<<
15262  * unicode filebase,
15263  * int base):
15264  */
15265 
15266 static PyObject *__pyx_pw_10cmeshTools_25generateFromHexFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15267 static void __pyx_f_10cmeshTools_generateFromHexFile(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
15268  CYTHON_UNUSED int __pyx_v_failed;
15269  __Pyx_RefNannyDeclarations
15270  PyObject *__pyx_t_1 = NULL;
15271  char const *__pyx_t_2;
15272  __Pyx_RefNannySetupContext("generateFromHexFile", 0);
15273 
15274  /* "cmeshTools.pyx":376
15275  * int base):
15276  * cdef int failed
15277  * failed = cppm.readHex(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15278  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
15279  *
15280  */
15281  if (unlikely(__pyx_v_filebase == Py_None)) {
15282  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15283  __PYX_ERR(1, 376, __pyx_L1_error)
15284  }
15285  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 376, __pyx_L1_error)
15286  __Pyx_GOTREF(__pyx_t_1);
15287  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 376, __pyx_L1_error)
15288  __pyx_v_failed = readHex(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
15289  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15290 
15291  /* "cmeshTools.pyx":377
15292  * cdef int failed
15293  * failed = cppm.readHex(cmesh.mesh,filebase.encode('utf8'),base);
15294  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh); # <<<<<<<<<<<<<<
15295  *
15296  * cpdef void generateFrom3DMFile(CMesh cmesh,
15297  */
15298  (void)(constructElementBoundaryElementsArray_hexahedron(__pyx_v_cmesh->mesh));
15299 
15300  /* "cmeshTools.pyx":372
15301  * failed = cppm.write2dmMesh(cmesh.mesh,filebase.encode('utf8'),base);
15302  *
15303  * cpdef void generateFromHexFile(CMesh cmesh, # <<<<<<<<<<<<<<
15304  * unicode filebase,
15305  * int base):
15306  */
15307 
15308  /* function exit code */
15309  goto __pyx_L0;
15310  __pyx_L1_error:;
15311  __Pyx_XDECREF(__pyx_t_1);
15312  __Pyx_WriteUnraisable("cmeshTools.generateFromHexFile", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15313  __pyx_L0:;
15314  __Pyx_RefNannyFinishContext();
15315 }
15316 
15317 /* Python wrapper */
15318 static PyObject *__pyx_pw_10cmeshTools_25generateFromHexFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15319 static PyObject *__pyx_pw_10cmeshTools_25generateFromHexFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15320  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15321  PyObject *__pyx_v_filebase = 0;
15322  int __pyx_v_base;
15323  PyObject *__pyx_r = 0;
15324  __Pyx_RefNannyDeclarations
15325  __Pyx_RefNannySetupContext("generateFromHexFile (wrapper)", 0);
15326  {
15327  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
15328  PyObject* values[3] = {0,0,0};
15329  if (unlikely(__pyx_kwds)) {
15330  Py_ssize_t kw_args;
15331  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15332  switch (pos_args) {
15333  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15334  CYTHON_FALLTHROUGH;
15335  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15336  CYTHON_FALLTHROUGH;
15337  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15338  CYTHON_FALLTHROUGH;
15339  case 0: break;
15340  default: goto __pyx_L5_argtuple_error;
15341  }
15342  kw_args = PyDict_Size(__pyx_kwds);
15343  switch (pos_args) {
15344  case 0:
15345  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15346  else goto __pyx_L5_argtuple_error;
15347  CYTHON_FALLTHROUGH;
15348  case 1:
15349  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
15350  else {
15351  __Pyx_RaiseArgtupleInvalid("generateFromHexFile", 1, 3, 3, 1); __PYX_ERR(1, 372, __pyx_L3_error)
15352  }
15353  CYTHON_FALLTHROUGH;
15354  case 2:
15355  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15356  else {
15357  __Pyx_RaiseArgtupleInvalid("generateFromHexFile", 1, 3, 3, 2); __PYX_ERR(1, 372, __pyx_L3_error)
15358  }
15359  }
15360  if (unlikely(kw_args > 0)) {
15361  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFromHexFile") < 0)) __PYX_ERR(1, 372, __pyx_L3_error)
15362  }
15363  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15364  goto __pyx_L5_argtuple_error;
15365  } else {
15366  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15367  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15368  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15369  }
15370  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15371  __pyx_v_filebase = ((PyObject*)values[1]);
15372  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 374, __pyx_L3_error)
15373  }
15374  goto __pyx_L4_argument_unpacking_done;
15375  __pyx_L5_argtuple_error:;
15376  __Pyx_RaiseArgtupleInvalid("generateFromHexFile", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 372, __pyx_L3_error)
15377  __pyx_L3_error:;
15378  __Pyx_AddTraceback("cmeshTools.generateFromHexFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
15379  __Pyx_RefNannyFinishContext();
15380  return NULL;
15381  __pyx_L4_argument_unpacking_done:;
15382  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 372, __pyx_L1_error)
15383  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 373, __pyx_L1_error)
15384  __pyx_r = __pyx_pf_10cmeshTools_24generateFromHexFile(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15385 
15386  /* function exit code */
15387  goto __pyx_L0;
15388  __pyx_L1_error:;
15389  __pyx_r = NULL;
15390  __pyx_L0:;
15391  __Pyx_RefNannyFinishContext();
15392  return __pyx_r;
15393 }
15394 
15395 static PyObject *__pyx_pf_10cmeshTools_24generateFromHexFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15396  PyObject *__pyx_r = NULL;
15397  __Pyx_RefNannyDeclarations
15398  PyObject *__pyx_t_1 = NULL;
15399  __Pyx_RefNannySetupContext("generateFromHexFile", 0);
15400  __Pyx_XDECREF(__pyx_r);
15401  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFromHexFile(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 372, __pyx_L1_error)
15402  __Pyx_GOTREF(__pyx_t_1);
15403  __pyx_r = __pyx_t_1;
15404  __pyx_t_1 = 0;
15405  goto __pyx_L0;
15406 
15407  /* function exit code */
15408  __pyx_L1_error:;
15409  __Pyx_XDECREF(__pyx_t_1);
15410  __Pyx_AddTraceback("cmeshTools.generateFromHexFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
15411  __pyx_r = NULL;
15412  __pyx_L0:;
15413  __Pyx_XGIVEREF(__pyx_r);
15414  __Pyx_RefNannyFinishContext();
15415  return __pyx_r;
15416 }
15417 
15418 /* "cmeshTools.pyx":379
15419  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
15420  *
15421  * cpdef void generateFrom3DMFile(CMesh cmesh, # <<<<<<<<<<<<<<
15422  * unicode filebase,
15423  * int base):
15424  */
15425 
15426 static PyObject *__pyx_pw_10cmeshTools_27generateFrom3DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15427 static void __pyx_f_10cmeshTools_generateFrom3DMFile(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
15428  CYTHON_UNUSED int __pyx_v_failed;
15429  __Pyx_RefNannyDeclarations
15430  PyObject *__pyx_t_1 = NULL;
15431  char const *__pyx_t_2;
15432  char const *__pyx_t_3;
15433  __Pyx_RefNannySetupContext("generateFrom3DMFile", 0);
15434 
15435  /* "cmeshTools.pyx":383
15436  * int base):
15437  * cdef int failed
15438  * failed = cppm.read3DM(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15439  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
15440  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15441  */
15442  if (unlikely(__pyx_v_filebase == Py_None)) {
15443  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15444  __PYX_ERR(1, 383, __pyx_L1_error)
15445  }
15446  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 383, __pyx_L1_error)
15447  __Pyx_GOTREF(__pyx_t_1);
15448  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 383, __pyx_L1_error)
15449  __pyx_v_failed = read3DM(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
15450  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15451 
15452  /* "cmeshTools.pyx":384
15453  * cdef int failed
15454  * failed = cppm.read3DM(cmesh.mesh,filebase.encode('utf8'),base);
15455  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
15456  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15457  *
15458  */
15459  (void)(constructElementBoundaryElementsArray_tetrahedron(__pyx_v_cmesh->mesh));
15460 
15461  /* "cmeshTools.pyx":385
15462  * failed = cppm.read3DM(cmesh.mesh,filebase.encode('utf8'),base);
15463  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
15464  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15465  *
15466  * cpdef void generateFrom2DMFile(CMesh cmesh,
15467  */
15468  if (unlikely(__pyx_v_filebase == Py_None)) {
15469  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15470  __PYX_ERR(1, 385, __pyx_L1_error)
15471  }
15472  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 385, __pyx_L1_error)
15473  __Pyx_GOTREF(__pyx_t_1);
15474  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 385, __pyx_L1_error)
15475  __pyx_v_failed = readBC(__pyx_v_cmesh->mesh, __pyx_t_3, __pyx_v_base);
15476  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15477 
15478  /* "cmeshTools.pyx":379
15479  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
15480  *
15481  * cpdef void generateFrom3DMFile(CMesh cmesh, # <<<<<<<<<<<<<<
15482  * unicode filebase,
15483  * int base):
15484  */
15485 
15486  /* function exit code */
15487  goto __pyx_L0;
15488  __pyx_L1_error:;
15489  __Pyx_XDECREF(__pyx_t_1);
15490  __Pyx_WriteUnraisable("cmeshTools.generateFrom3DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15491  __pyx_L0:;
15492  __Pyx_RefNannyFinishContext();
15493 }
15494 
15495 /* Python wrapper */
15496 static PyObject *__pyx_pw_10cmeshTools_27generateFrom3DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15497 static PyObject *__pyx_pw_10cmeshTools_27generateFrom3DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15498  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15499  PyObject *__pyx_v_filebase = 0;
15500  int __pyx_v_base;
15501  PyObject *__pyx_r = 0;
15502  __Pyx_RefNannyDeclarations
15503  __Pyx_RefNannySetupContext("generateFrom3DMFile (wrapper)", 0);
15504  {
15505  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
15506  PyObject* values[3] = {0,0,0};
15507  if (unlikely(__pyx_kwds)) {
15508  Py_ssize_t kw_args;
15509  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15510  switch (pos_args) {
15511  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15512  CYTHON_FALLTHROUGH;
15513  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15514  CYTHON_FALLTHROUGH;
15515  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15516  CYTHON_FALLTHROUGH;
15517  case 0: break;
15518  default: goto __pyx_L5_argtuple_error;
15519  }
15520  kw_args = PyDict_Size(__pyx_kwds);
15521  switch (pos_args) {
15522  case 0:
15523  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15524  else goto __pyx_L5_argtuple_error;
15525  CYTHON_FALLTHROUGH;
15526  case 1:
15527  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
15528  else {
15529  __Pyx_RaiseArgtupleInvalid("generateFrom3DMFile", 1, 3, 3, 1); __PYX_ERR(1, 379, __pyx_L3_error)
15530  }
15531  CYTHON_FALLTHROUGH;
15532  case 2:
15533  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15534  else {
15535  __Pyx_RaiseArgtupleInvalid("generateFrom3DMFile", 1, 3, 3, 2); __PYX_ERR(1, 379, __pyx_L3_error)
15536  }
15537  }
15538  if (unlikely(kw_args > 0)) {
15539  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFrom3DMFile") < 0)) __PYX_ERR(1, 379, __pyx_L3_error)
15540  }
15541  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15542  goto __pyx_L5_argtuple_error;
15543  } else {
15544  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15545  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15546  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15547  }
15548  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15549  __pyx_v_filebase = ((PyObject*)values[1]);
15550  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 381, __pyx_L3_error)
15551  }
15552  goto __pyx_L4_argument_unpacking_done;
15553  __pyx_L5_argtuple_error:;
15554  __Pyx_RaiseArgtupleInvalid("generateFrom3DMFile", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 379, __pyx_L3_error)
15555  __pyx_L3_error:;
15556  __Pyx_AddTraceback("cmeshTools.generateFrom3DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
15557  __Pyx_RefNannyFinishContext();
15558  return NULL;
15559  __pyx_L4_argument_unpacking_done:;
15560  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 379, __pyx_L1_error)
15561  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 380, __pyx_L1_error)
15562  __pyx_r = __pyx_pf_10cmeshTools_26generateFrom3DMFile(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15563 
15564  /* function exit code */
15565  goto __pyx_L0;
15566  __pyx_L1_error:;
15567  __pyx_r = NULL;
15568  __pyx_L0:;
15569  __Pyx_RefNannyFinishContext();
15570  return __pyx_r;
15571 }
15572 
15573 static PyObject *__pyx_pf_10cmeshTools_26generateFrom3DMFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15574  PyObject *__pyx_r = NULL;
15575  __Pyx_RefNannyDeclarations
15576  PyObject *__pyx_t_1 = NULL;
15577  __Pyx_RefNannySetupContext("generateFrom3DMFile", 0);
15578  __Pyx_XDECREF(__pyx_r);
15579  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFrom3DMFile(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 379, __pyx_L1_error)
15580  __Pyx_GOTREF(__pyx_t_1);
15581  __pyx_r = __pyx_t_1;
15582  __pyx_t_1 = 0;
15583  goto __pyx_L0;
15584 
15585  /* function exit code */
15586  __pyx_L1_error:;
15587  __Pyx_XDECREF(__pyx_t_1);
15588  __Pyx_AddTraceback("cmeshTools.generateFrom3DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
15589  __pyx_r = NULL;
15590  __pyx_L0:;
15591  __Pyx_XGIVEREF(__pyx_r);
15592  __Pyx_RefNannyFinishContext();
15593  return __pyx_r;
15594 }
15595 
15596 /* "cmeshTools.pyx":387
15597  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15598  *
15599  * cpdef void generateFrom2DMFile(CMesh cmesh, # <<<<<<<<<<<<<<
15600  * unicode filebase,
15601  * int base):
15602  */
15603 
15604 static PyObject *__pyx_pw_10cmeshTools_29generateFrom2DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15605 static void __pyx_f_10cmeshTools_generateFrom2DMFile(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base, CYTHON_UNUSED int __pyx_skip_dispatch) {
15606  CYTHON_UNUSED int __pyx_v_failed;
15607  __Pyx_RefNannyDeclarations
15608  PyObject *__pyx_t_1 = NULL;
15609  char const *__pyx_t_2;
15610  char const *__pyx_t_3;
15611  __Pyx_RefNannySetupContext("generateFrom2DMFile", 0);
15612 
15613  /* "cmeshTools.pyx":391
15614  * int base):
15615  * cdef int failed
15616  * failed = cppm.read2DM(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15617  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
15618  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15619  */
15620  if (unlikely(__pyx_v_filebase == Py_None)) {
15621  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15622  __PYX_ERR(1, 391, __pyx_L1_error)
15623  }
15624  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 391, __pyx_L1_error)
15625  __Pyx_GOTREF(__pyx_t_1);
15626  __pyx_t_2 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(1, 391, __pyx_L1_error)
15627  __pyx_v_failed = read2DM(__pyx_v_cmesh->mesh, __pyx_t_2, __pyx_v_base);
15628  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15629 
15630  /* "cmeshTools.pyx":392
15631  * cdef int failed
15632  * failed = cppm.read2DM(cmesh.mesh,filebase.encode('utf8'),base);
15633  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
15634  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15635  *
15636  */
15637  (void)(constructElementBoundaryElementsArray_triangle(__pyx_v_cmesh->mesh));
15638 
15639  /* "cmeshTools.pyx":393
15640  * failed = cppm.read2DM(cmesh.mesh,filebase.encode('utf8'),base);
15641  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
15642  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base); # <<<<<<<<<<<<<<
15643  *
15644  * cpdef void computeGeometricInfo_tetrahedron(CMesh cmesh):
15645  */
15646  if (unlikely(__pyx_v_filebase == Py_None)) {
15647  PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode");
15648  __PYX_ERR(1, 393, __pyx_L1_error)
15649  }
15650  __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_filebase); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 393, __pyx_L1_error)
15651  __Pyx_GOTREF(__pyx_t_1);
15652  __pyx_t_3 = __Pyx_PyBytes_AsString(__pyx_t_1); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(1, 393, __pyx_L1_error)
15653  __pyx_v_failed = readBC(__pyx_v_cmesh->mesh, __pyx_t_3, __pyx_v_base);
15654  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
15655 
15656  /* "cmeshTools.pyx":387
15657  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15658  *
15659  * cpdef void generateFrom2DMFile(CMesh cmesh, # <<<<<<<<<<<<<<
15660  * unicode filebase,
15661  * int base):
15662  */
15663 
15664  /* function exit code */
15665  goto __pyx_L0;
15666  __pyx_L1_error:;
15667  __Pyx_XDECREF(__pyx_t_1);
15668  __Pyx_WriteUnraisable("cmeshTools.generateFrom2DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
15669  __pyx_L0:;
15670  __Pyx_RefNannyFinishContext();
15671 }
15672 
15673 /* Python wrapper */
15674 static PyObject *__pyx_pw_10cmeshTools_29generateFrom2DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15675 static PyObject *__pyx_pw_10cmeshTools_29generateFrom2DMFile(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15676  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15677  PyObject *__pyx_v_filebase = 0;
15678  int __pyx_v_base;
15679  PyObject *__pyx_r = 0;
15680  __Pyx_RefNannyDeclarations
15681  __Pyx_RefNannySetupContext("generateFrom2DMFile (wrapper)", 0);
15682  {
15683  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_filebase,&__pyx_n_s_base,0};
15684  PyObject* values[3] = {0,0,0};
15685  if (unlikely(__pyx_kwds)) {
15686  Py_ssize_t kw_args;
15687  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15688  switch (pos_args) {
15689  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15690  CYTHON_FALLTHROUGH;
15691  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15692  CYTHON_FALLTHROUGH;
15693  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15694  CYTHON_FALLTHROUGH;
15695  case 0: break;
15696  default: goto __pyx_L5_argtuple_error;
15697  }
15698  kw_args = PyDict_Size(__pyx_kwds);
15699  switch (pos_args) {
15700  case 0:
15701  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15702  else goto __pyx_L5_argtuple_error;
15703  CYTHON_FALLTHROUGH;
15704  case 1:
15705  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filebase)) != 0)) kw_args--;
15706  else {
15707  __Pyx_RaiseArgtupleInvalid("generateFrom2DMFile", 1, 3, 3, 1); __PYX_ERR(1, 387, __pyx_L3_error)
15708  }
15709  CYTHON_FALLTHROUGH;
15710  case 2:
15711  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_base)) != 0)) kw_args--;
15712  else {
15713  __Pyx_RaiseArgtupleInvalid("generateFrom2DMFile", 1, 3, 3, 2); __PYX_ERR(1, 387, __pyx_L3_error)
15714  }
15715  }
15716  if (unlikely(kw_args > 0)) {
15717  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateFrom2DMFile") < 0)) __PYX_ERR(1, 387, __pyx_L3_error)
15718  }
15719  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
15720  goto __pyx_L5_argtuple_error;
15721  } else {
15722  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15723  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15724  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15725  }
15726  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
15727  __pyx_v_filebase = ((PyObject*)values[1]);
15728  __pyx_v_base = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_base == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 389, __pyx_L3_error)
15729  }
15730  goto __pyx_L4_argument_unpacking_done;
15731  __pyx_L5_argtuple_error:;
15732  __Pyx_RaiseArgtupleInvalid("generateFrom2DMFile", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 387, __pyx_L3_error)
15733  __pyx_L3_error:;
15734  __Pyx_AddTraceback("cmeshTools.generateFrom2DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
15735  __Pyx_RefNannyFinishContext();
15736  return NULL;
15737  __pyx_L4_argument_unpacking_done:;
15738  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 387, __pyx_L1_error)
15739  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filebase), (&PyUnicode_Type), 1, "filebase", 1))) __PYX_ERR(1, 388, __pyx_L1_error)
15740  __pyx_r = __pyx_pf_10cmeshTools_28generateFrom2DMFile(__pyx_self, __pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base);
15741 
15742  /* function exit code */
15743  goto __pyx_L0;
15744  __pyx_L1_error:;
15745  __pyx_r = NULL;
15746  __pyx_L0:;
15747  __Pyx_RefNannyFinishContext();
15748  return __pyx_r;
15749 }
15750 
15751 static PyObject *__pyx_pf_10cmeshTools_28generateFrom2DMFile(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, PyObject *__pyx_v_filebase, int __pyx_v_base) {
15752  PyObject *__pyx_r = NULL;
15753  __Pyx_RefNannyDeclarations
15754  PyObject *__pyx_t_1 = NULL;
15755  __Pyx_RefNannySetupContext("generateFrom2DMFile", 0);
15756  __Pyx_XDECREF(__pyx_r);
15757  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateFrom2DMFile(__pyx_v_cmesh, __pyx_v_filebase, __pyx_v_base, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 387, __pyx_L1_error)
15758  __Pyx_GOTREF(__pyx_t_1);
15759  __pyx_r = __pyx_t_1;
15760  __pyx_t_1 = 0;
15761  goto __pyx_L0;
15762 
15763  /* function exit code */
15764  __pyx_L1_error:;
15765  __Pyx_XDECREF(__pyx_t_1);
15766  __Pyx_AddTraceback("cmeshTools.generateFrom2DMFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
15767  __pyx_r = NULL;
15768  __pyx_L0:;
15769  __Pyx_XGIVEREF(__pyx_r);
15770  __Pyx_RefNannyFinishContext();
15771  return __pyx_r;
15772 }
15773 
15774 /* "cmeshTools.pyx":395
15775  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15776  *
15777  * cpdef void computeGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
15778  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh);
15779  *
15780  */
15781 
15782 static PyObject *__pyx_pw_10cmeshTools_31computeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
15783 static void __pyx_f_10cmeshTools_computeGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
15784  __Pyx_RefNannyDeclarations
15785  __Pyx_RefNannySetupContext("computeGeometricInfo_tetrahedron", 0);
15786 
15787  /* "cmeshTools.pyx":396
15788  *
15789  * cpdef void computeGeometricInfo_tetrahedron(CMesh cmesh):
15790  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
15791  *
15792  * cpdef void allocateGeometricInfo_tetrahedron(CMesh cmesh):
15793  */
15794  (void)(computeGeometricInfo_tetrahedron(__pyx_v_cmesh->mesh));
15795 
15796  /* "cmeshTools.pyx":395
15797  * failed = cppm.readBC(cmesh.mesh,filebase.encode('utf8'),base);
15798  *
15799  * cpdef void computeGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
15800  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh);
15801  *
15802  */
15803 
15804  /* function exit code */
15805  __Pyx_RefNannyFinishContext();
15806 }
15807 
15808 /* Python wrapper */
15809 static PyObject *__pyx_pw_10cmeshTools_31computeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
15810 static PyObject *__pyx_pw_10cmeshTools_31computeGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
15811  PyObject *__pyx_r = 0;
15812  __Pyx_RefNannyDeclarations
15813  __Pyx_RefNannySetupContext("computeGeometricInfo_tetrahedron (wrapper)", 0);
15814  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 395, __pyx_L1_error)
15815  __pyx_r = __pyx_pf_10cmeshTools_30computeGeometricInfo_tetrahedron(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
15816 
15817  /* function exit code */
15818  goto __pyx_L0;
15819  __pyx_L1_error:;
15820  __pyx_r = NULL;
15821  __pyx_L0:;
15822  __Pyx_RefNannyFinishContext();
15823  return __pyx_r;
15824 }
15825 
15826 static PyObject *__pyx_pf_10cmeshTools_30computeGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
15827  PyObject *__pyx_r = NULL;
15828  __Pyx_RefNannyDeclarations
15829  PyObject *__pyx_t_1 = NULL;
15830  __Pyx_RefNannySetupContext("computeGeometricInfo_tetrahedron", 0);
15831  __Pyx_XDECREF(__pyx_r);
15832  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_tetrahedron(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 395, __pyx_L1_error)
15833  __Pyx_GOTREF(__pyx_t_1);
15834  __pyx_r = __pyx_t_1;
15835  __pyx_t_1 = 0;
15836  goto __pyx_L0;
15837 
15838  /* function exit code */
15839  __pyx_L1_error:;
15840  __Pyx_XDECREF(__pyx_t_1);
15841  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_tetrahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
15842  __pyx_r = NULL;
15843  __pyx_L0:;
15844  __Pyx_XGIVEREF(__pyx_r);
15845  __Pyx_RefNannyFinishContext();
15846  return __pyx_r;
15847 }
15848 
15849 /* "cmeshTools.pyx":398
15850  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh);
15851  *
15852  * cpdef void allocateGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
15853  * cppm.allocateGeometricInfo_tetrahedron(cmesh.mesh);
15854  *
15855  */
15856 
15857 static PyObject *__pyx_pw_10cmeshTools_33allocateGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
15858 static void __pyx_f_10cmeshTools_allocateGeometricInfo_tetrahedron(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
15859  __Pyx_RefNannyDeclarations
15860  __Pyx_RefNannySetupContext("allocateGeometricInfo_tetrahedron", 0);
15861 
15862  /* "cmeshTools.pyx":399
15863  *
15864  * cpdef void allocateGeometricInfo_tetrahedron(CMesh cmesh):
15865  * cppm.allocateGeometricInfo_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
15866  *
15867  * cpdef void allocateNodeAndElementNodeDataStructures(CMesh cmesh,
15868  */
15869  (void)(allocateGeometricInfo_tetrahedron(__pyx_v_cmesh->mesh));
15870 
15871  /* "cmeshTools.pyx":398
15872  * cppm.computeGeometricInfo_tetrahedron(cmesh.mesh);
15873  *
15874  * cpdef void allocateGeometricInfo_tetrahedron(CMesh cmesh): # <<<<<<<<<<<<<<
15875  * cppm.allocateGeometricInfo_tetrahedron(cmesh.mesh);
15876  *
15877  */
15878 
15879  /* function exit code */
15880  __Pyx_RefNannyFinishContext();
15881 }
15882 
15883 /* Python wrapper */
15884 static PyObject *__pyx_pw_10cmeshTools_33allocateGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
15885 static PyObject *__pyx_pw_10cmeshTools_33allocateGeometricInfo_tetrahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
15886  PyObject *__pyx_r = 0;
15887  __Pyx_RefNannyDeclarations
15888  __Pyx_RefNannySetupContext("allocateGeometricInfo_tetrahedron (wrapper)", 0);
15889  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 398, __pyx_L1_error)
15890  __pyx_r = __pyx_pf_10cmeshTools_32allocateGeometricInfo_tetrahedron(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
15891 
15892  /* function exit code */
15893  goto __pyx_L0;
15894  __pyx_L1_error:;
15895  __pyx_r = NULL;
15896  __pyx_L0:;
15897  __Pyx_RefNannyFinishContext();
15898  return __pyx_r;
15899 }
15900 
15901 static PyObject *__pyx_pf_10cmeshTools_32allocateGeometricInfo_tetrahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
15902  PyObject *__pyx_r = NULL;
15903  __Pyx_RefNannyDeclarations
15904  PyObject *__pyx_t_1 = NULL;
15905  __Pyx_RefNannySetupContext("allocateGeometricInfo_tetrahedron", 0);
15906  __Pyx_XDECREF(__pyx_r);
15907  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_tetrahedron(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 398, __pyx_L1_error)
15908  __Pyx_GOTREF(__pyx_t_1);
15909  __pyx_r = __pyx_t_1;
15910  __pyx_t_1 = 0;
15911  goto __pyx_L0;
15912 
15913  /* function exit code */
15914  __pyx_L1_error:;
15915  __Pyx_XDECREF(__pyx_t_1);
15916  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_tetrahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
15917  __pyx_r = NULL;
15918  __pyx_L0:;
15919  __Pyx_XGIVEREF(__pyx_r);
15920  __Pyx_RefNannyFinishContext();
15921  return __pyx_r;
15922 }
15923 
15924 /* "cmeshTools.pyx":401
15925  * cppm.allocateGeometricInfo_tetrahedron(cmesh.mesh);
15926  *
15927  * cpdef void allocateNodeAndElementNodeDataStructures(CMesh cmesh, # <<<<<<<<<<<<<<
15928  * int nElements_global,
15929  * int nNodes_global,
15930  */
15931 
15932 static PyObject *__pyx_pw_10cmeshTools_35allocateNodeAndElementNodeDataStructures(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15933 static void __pyx_f_10cmeshTools_allocateNodeAndElementNodeDataStructures(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_nElements_global, int __pyx_v_nNodes_global, int __pyx_v_nNodes_element, CYTHON_UNUSED int __pyx_skip_dispatch) {
15934  __Pyx_RefNannyDeclarations
15935  __Pyx_RefNannySetupContext("allocateNodeAndElementNodeDataStructures", 0);
15936 
15937  /* "cmeshTools.pyx":405
15938  * int nNodes_global,
15939  * int nNodes_element):
15940  * cppm.allocateNodeAndElementNodeDataStructures(cmesh.mesh,nElements_global,nNodes_global,nNodes_element); # <<<<<<<<<<<<<<
15941  *
15942  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh):
15943  */
15944  (void)(allocateNodeAndElementNodeDataStructures(__pyx_v_cmesh->mesh, __pyx_v_nElements_global, __pyx_v_nNodes_global, __pyx_v_nNodes_element));
15945 
15946  /* "cmeshTools.pyx":401
15947  * cppm.allocateGeometricInfo_tetrahedron(cmesh.mesh);
15948  *
15949  * cpdef void allocateNodeAndElementNodeDataStructures(CMesh cmesh, # <<<<<<<<<<<<<<
15950  * int nElements_global,
15951  * int nNodes_global,
15952  */
15953 
15954  /* function exit code */
15955  __Pyx_RefNannyFinishContext();
15956 }
15957 
15958 /* Python wrapper */
15959 static PyObject *__pyx_pw_10cmeshTools_35allocateNodeAndElementNodeDataStructures(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
15960 static PyObject *__pyx_pw_10cmeshTools_35allocateNodeAndElementNodeDataStructures(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
15961  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
15962  int __pyx_v_nElements_global;
15963  int __pyx_v_nNodes_global;
15964  int __pyx_v_nNodes_element;
15965  PyObject *__pyx_r = 0;
15966  __Pyx_RefNannyDeclarations
15967  __Pyx_RefNannySetupContext("allocateNodeAndElementNodeDataStructures (wrapper)", 0);
15968  {
15969  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_cmesh,&__pyx_n_s_nElements_global,&__pyx_n_s_nNodes_global,&__pyx_n_s_nNodes_element,0};
15970  PyObject* values[4] = {0,0,0,0};
15971  if (unlikely(__pyx_kwds)) {
15972  Py_ssize_t kw_args;
15973  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
15974  switch (pos_args) {
15975  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
15976  CYTHON_FALLTHROUGH;
15977  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
15978  CYTHON_FALLTHROUGH;
15979  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
15980  CYTHON_FALLTHROUGH;
15981  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
15982  CYTHON_FALLTHROUGH;
15983  case 0: break;
15984  default: goto __pyx_L5_argtuple_error;
15985  }
15986  kw_args = PyDict_Size(__pyx_kwds);
15987  switch (pos_args) {
15988  case 0:
15989  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
15990  else goto __pyx_L5_argtuple_error;
15991  CYTHON_FALLTHROUGH;
15992  case 1:
15993  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nElements_global)) != 0)) kw_args--;
15994  else {
15995  __Pyx_RaiseArgtupleInvalid("allocateNodeAndElementNodeDataStructures", 1, 4, 4, 1); __PYX_ERR(1, 401, __pyx_L3_error)
15996  }
15997  CYTHON_FALLTHROUGH;
15998  case 2:
15999  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_global)) != 0)) kw_args--;
16000  else {
16001  __Pyx_RaiseArgtupleInvalid("allocateNodeAndElementNodeDataStructures", 1, 4, 4, 2); __PYX_ERR(1, 401, __pyx_L3_error)
16002  }
16003  CYTHON_FALLTHROUGH;
16004  case 3:
16005  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nNodes_element)) != 0)) kw_args--;
16006  else {
16007  __Pyx_RaiseArgtupleInvalid("allocateNodeAndElementNodeDataStructures", 1, 4, 4, 3); __PYX_ERR(1, 401, __pyx_L3_error)
16008  }
16009  }
16010  if (unlikely(kw_args > 0)) {
16011  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "allocateNodeAndElementNodeDataStructures") < 0)) __PYX_ERR(1, 401, __pyx_L3_error)
16012  }
16013  } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
16014  goto __pyx_L5_argtuple_error;
16015  } else {
16016  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16017  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16018  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16019  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16020  }
16021  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[0]);
16022  __pyx_v_nElements_global = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_nElements_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 402, __pyx_L3_error)
16023  __pyx_v_nNodes_global = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nNodes_global == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 403, __pyx_L3_error)
16024  __pyx_v_nNodes_element = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_nNodes_element == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 404, __pyx_L3_error)
16025  }
16026  goto __pyx_L4_argument_unpacking_done;
16027  __pyx_L5_argtuple_error:;
16028  __Pyx_RaiseArgtupleInvalid("allocateNodeAndElementNodeDataStructures", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 401, __pyx_L3_error)
16029  __pyx_L3_error:;
16030  __Pyx_AddTraceback("cmeshTools.allocateNodeAndElementNodeDataStructures", __pyx_clineno, __pyx_lineno, __pyx_filename);
16031  __Pyx_RefNannyFinishContext();
16032  return NULL;
16033  __pyx_L4_argument_unpacking_done:;
16034  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 401, __pyx_L1_error)
16035  __pyx_r = __pyx_pf_10cmeshTools_34allocateNodeAndElementNodeDataStructures(__pyx_self, __pyx_v_cmesh, __pyx_v_nElements_global, __pyx_v_nNodes_global, __pyx_v_nNodes_element);
16036 
16037  /* function exit code */
16038  goto __pyx_L0;
16039  __pyx_L1_error:;
16040  __pyx_r = NULL;
16041  __pyx_L0:;
16042  __Pyx_RefNannyFinishContext();
16043  return __pyx_r;
16044 }
16045 
16046 static PyObject *__pyx_pf_10cmeshTools_34allocateNodeAndElementNodeDataStructures(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_nElements_global, int __pyx_v_nNodes_global, int __pyx_v_nNodes_element) {
16047  PyObject *__pyx_r = NULL;
16048  __Pyx_RefNannyDeclarations
16049  PyObject *__pyx_t_1 = NULL;
16050  __Pyx_RefNannySetupContext("allocateNodeAndElementNodeDataStructures", 0);
16051  __Pyx_XDECREF(__pyx_r);
16052  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateNodeAndElementNodeDataStructures(__pyx_v_cmesh, __pyx_v_nElements_global, __pyx_v_nNodes_global, __pyx_v_nNodes_element, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 401, __pyx_L1_error)
16053  __Pyx_GOTREF(__pyx_t_1);
16054  __pyx_r = __pyx_t_1;
16055  __pyx_t_1 = 0;
16056  goto __pyx_L0;
16057 
16058  /* function exit code */
16059  __pyx_L1_error:;
16060  __Pyx_XDECREF(__pyx_t_1);
16061  __Pyx_AddTraceback("cmeshTools.allocateNodeAndElementNodeDataStructures", __pyx_clineno, __pyx_lineno, __pyx_filename);
16062  __pyx_r = NULL;
16063  __pyx_L0:;
16064  __Pyx_XGIVEREF(__pyx_r);
16065  __Pyx_RefNannyFinishContext();
16066  return __pyx_r;
16067 }
16068 
16069 /* "cmeshTools.pyx":407
16070  * cppm.allocateNodeAndElementNodeDataStructures(cmesh.mesh,nElements_global,nNodes_global,nNodes_element);
16071  *
16072  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh): # <<<<<<<<<<<<<<
16073  * if cmesh.mesh.nNodes_element == 4:
16074  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16075  */
16076 
16077 static PyObject *__pyx_pw_10cmeshTools_37constructElementBoundaryElementsArray(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16078 static void __pyx_f_10cmeshTools_constructElementBoundaryElementsArray(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
16079  __Pyx_RefNannyDeclarations
16080  __Pyx_RefNannySetupContext("constructElementBoundaryElementsArray", 0);
16081 
16082  /* "cmeshTools.pyx":408
16083  *
16084  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh):
16085  * if cmesh.mesh.nNodes_element == 4: # <<<<<<<<<<<<<<
16086  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16087  * elif cmesh.mesh.nNodes_element == 3:
16088  */
16089  switch (__pyx_v_cmesh->mesh.nNodes_element) {
16090  case 4:
16091 
16092  /* "cmeshTools.pyx":409
16093  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh):
16094  * if cmesh.mesh.nNodes_element == 4:
16095  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh); # <<<<<<<<<<<<<<
16096  * elif cmesh.mesh.nNodes_element == 3:
16097  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16098  */
16099  (void)(constructElementBoundaryElementsArray_tetrahedron(__pyx_v_cmesh->mesh));
16100 
16101  /* "cmeshTools.pyx":408
16102  *
16103  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh):
16104  * if cmesh.mesh.nNodes_element == 4: # <<<<<<<<<<<<<<
16105  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16106  * elif cmesh.mesh.nNodes_element == 3:
16107  */
16108  break;
16109  case 3:
16110 
16111  /* "cmeshTools.pyx":411
16112  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16113  * elif cmesh.mesh.nNodes_element == 3:
16114  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
16115  * else:
16116  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
16117  */
16118  (void)(constructElementBoundaryElementsArray_triangle(__pyx_v_cmesh->mesh));
16119 
16120  /* "cmeshTools.pyx":410
16121  * if cmesh.mesh.nNodes_element == 4:
16122  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16123  * elif cmesh.mesh.nNodes_element == 3: # <<<<<<<<<<<<<<
16124  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16125  * else:
16126  */
16127  break;
16128  default:
16129 
16130  /* "cmeshTools.pyx":413
16131  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16132  * else:
16133  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh); # <<<<<<<<<<<<<<
16134  *
16135  * cpdef void generateTriangularMeshFromRectangularGrid(int nx,
16136  */
16137  (void)(constructElementBoundaryElementsArray_edge(__pyx_v_cmesh->mesh));
16138  break;
16139  }
16140 
16141  /* "cmeshTools.pyx":407
16142  * cppm.allocateNodeAndElementNodeDataStructures(cmesh.mesh,nElements_global,nNodes_global,nNodes_element);
16143  *
16144  * cpdef void constructElementBoundaryElementsArray(CMesh cmesh): # <<<<<<<<<<<<<<
16145  * if cmesh.mesh.nNodes_element == 4:
16146  * cppm.constructElementBoundaryElementsArray_tetrahedron(cmesh.mesh);
16147  */
16148 
16149  /* function exit code */
16150  __Pyx_RefNannyFinishContext();
16151 }
16152 
16153 /* Python wrapper */
16154 static PyObject *__pyx_pw_10cmeshTools_37constructElementBoundaryElementsArray(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16155 static PyObject *__pyx_pw_10cmeshTools_37constructElementBoundaryElementsArray(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
16156  PyObject *__pyx_r = 0;
16157  __Pyx_RefNannyDeclarations
16158  __Pyx_RefNannySetupContext("constructElementBoundaryElementsArray (wrapper)", 0);
16159  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 407, __pyx_L1_error)
16160  __pyx_r = __pyx_pf_10cmeshTools_36constructElementBoundaryElementsArray(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
16161 
16162  /* function exit code */
16163  goto __pyx_L0;
16164  __pyx_L1_error:;
16165  __pyx_r = NULL;
16166  __pyx_L0:;
16167  __Pyx_RefNannyFinishContext();
16168  return __pyx_r;
16169 }
16170 
16171 static PyObject *__pyx_pf_10cmeshTools_36constructElementBoundaryElementsArray(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
16172  PyObject *__pyx_r = NULL;
16173  __Pyx_RefNannyDeclarations
16174  PyObject *__pyx_t_1 = NULL;
16175  __Pyx_RefNannySetupContext("constructElementBoundaryElementsArray", 0);
16176  __Pyx_XDECREF(__pyx_r);
16177  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_constructElementBoundaryElementsArray(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 407, __pyx_L1_error)
16178  __Pyx_GOTREF(__pyx_t_1);
16179  __pyx_r = __pyx_t_1;
16180  __pyx_t_1 = 0;
16181  goto __pyx_L0;
16182 
16183  /* function exit code */
16184  __pyx_L1_error:;
16185  __Pyx_XDECREF(__pyx_t_1);
16186  __Pyx_AddTraceback("cmeshTools.constructElementBoundaryElementsArray", __pyx_clineno, __pyx_lineno, __pyx_filename);
16187  __pyx_r = NULL;
16188  __pyx_L0:;
16189  __Pyx_XGIVEREF(__pyx_r);
16190  __Pyx_RefNannyFinishContext();
16191  return __pyx_r;
16192 }
16193 
16194 /* "cmeshTools.pyx":415
16195  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
16196  *
16197  * cpdef void generateTriangularMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16198  * int ny,
16199  * double Lx,
16200  */
16201 
16202 static PyObject *__pyx_pw_10cmeshTools_39generateTriangularMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16203 static void __pyx_f_10cmeshTools_generateTriangularMeshFromRectangularGrid(int __pyx_v_nx, int __pyx_v_ny, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_triangleFlag, CYTHON_UNUSED int __pyx_skip_dispatch) {
16204  __Pyx_RefNannyDeclarations
16205  __Pyx_RefNannySetupContext("generateTriangularMeshFromRectangularGrid", 0);
16206 
16207  /* "cmeshTools.pyx":421
16208  * CMesh cmesh,
16209  * int triangleFlag):
16210  * cppm.regularRectangularToTriangularMeshElements(nx,ny,cmesh.mesh,triangleFlag); # <<<<<<<<<<<<<<
16211  * cppm.regularRectangularToTriangularMeshNodes(nx,ny,Lx,Ly,cmesh.mesh);
16212  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16213  */
16214  (void)(regularRectangularToTriangularMeshElements(__pyx_v_nx, __pyx_v_ny, __pyx_v_cmesh->mesh, __pyx_v_triangleFlag));
16215 
16216  /* "cmeshTools.pyx":422
16217  * int triangleFlag):
16218  * cppm.regularRectangularToTriangularMeshElements(nx,ny,cmesh.mesh,triangleFlag);
16219  * cppm.regularRectangularToTriangularMeshNodes(nx,ny,Lx,Ly,cmesh.mesh); # <<<<<<<<<<<<<<
16220  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16221  * cppm.regularRectangularToTriangularElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16222  */
16223  (void)(regularRectangularToTriangularMeshNodes(__pyx_v_nx, __pyx_v_ny, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh->mesh));
16224 
16225  /* "cmeshTools.pyx":423
16226  * cppm.regularRectangularToTriangularMeshElements(nx,ny,cmesh.mesh,triangleFlag);
16227  * cppm.regularRectangularToTriangularMeshNodes(nx,ny,Lx,Ly,cmesh.mesh);
16228  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
16229  * cppm.regularRectangularToTriangularElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16230  *
16231  */
16232  (void)(constructElementBoundaryElementsArray_triangle(__pyx_v_cmesh->mesh));
16233 
16234  /* "cmeshTools.pyx":424
16235  * cppm.regularRectangularToTriangularMeshNodes(nx,ny,Lx,Ly,cmesh.mesh);
16236  * cppm.constructElementBoundaryElementsArray_triangle(cmesh.mesh);
16237  * cppm.regularRectangularToTriangularElementBoundaryMaterials(Lx,Ly,cmesh.mesh); # <<<<<<<<<<<<<<
16238  *
16239  * cpdef void generateHexahedralMeshFromRectangularGrid(int nx,
16240  */
16241  (void)(regularRectangularToTriangularElementBoundaryMaterials(__pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh->mesh));
16242 
16243  /* "cmeshTools.pyx":415
16244  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
16245  *
16246  * cpdef void generateTriangularMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16247  * int ny,
16248  * double Lx,
16249  */
16250 
16251  /* function exit code */
16252  __Pyx_RefNannyFinishContext();
16253 }
16254 
16255 /* Python wrapper */
16256 static PyObject *__pyx_pw_10cmeshTools_39generateTriangularMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16257 static PyObject *__pyx_pw_10cmeshTools_39generateTriangularMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16258  int __pyx_v_nx;
16259  int __pyx_v_ny;
16260  double __pyx_v_Lx;
16261  double __pyx_v_Ly;
16262  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
16263  int __pyx_v_triangleFlag;
16264  PyObject *__pyx_r = 0;
16265  __Pyx_RefNannyDeclarations
16266  __Pyx_RefNannySetupContext("generateTriangularMeshFromRectangularGrid (wrapper)", 0);
16267  {
16268  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nx,&__pyx_n_s_ny,&__pyx_n_s_Lx,&__pyx_n_s_Ly,&__pyx_n_s_cmesh,&__pyx_n_s_triangleFlag,0};
16269  PyObject* values[6] = {0,0,0,0,0,0};
16270  if (unlikely(__pyx_kwds)) {
16271  Py_ssize_t kw_args;
16272  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16273  switch (pos_args) {
16274  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
16275  CYTHON_FALLTHROUGH;
16276  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
16277  CYTHON_FALLTHROUGH;
16278  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16279  CYTHON_FALLTHROUGH;
16280  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16281  CYTHON_FALLTHROUGH;
16282  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16283  CYTHON_FALLTHROUGH;
16284  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16285  CYTHON_FALLTHROUGH;
16286  case 0: break;
16287  default: goto __pyx_L5_argtuple_error;
16288  }
16289  kw_args = PyDict_Size(__pyx_kwds);
16290  switch (pos_args) {
16291  case 0:
16292  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;
16293  else goto __pyx_L5_argtuple_error;
16294  CYTHON_FALLTHROUGH;
16295  case 1:
16296  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ny)) != 0)) kw_args--;
16297  else {
16298  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, 1); __PYX_ERR(1, 415, __pyx_L3_error)
16299  }
16300  CYTHON_FALLTHROUGH;
16301  case 2:
16302  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lx)) != 0)) kw_args--;
16303  else {
16304  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, 2); __PYX_ERR(1, 415, __pyx_L3_error)
16305  }
16306  CYTHON_FALLTHROUGH;
16307  case 3:
16308  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Ly)) != 0)) kw_args--;
16309  else {
16310  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, 3); __PYX_ERR(1, 415, __pyx_L3_error)
16311  }
16312  CYTHON_FALLTHROUGH;
16313  case 4:
16314  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
16315  else {
16316  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, 4); __PYX_ERR(1, 415, __pyx_L3_error)
16317  }
16318  CYTHON_FALLTHROUGH;
16319  case 5:
16320  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_triangleFlag)) != 0)) kw_args--;
16321  else {
16322  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, 5); __PYX_ERR(1, 415, __pyx_L3_error)
16323  }
16324  }
16325  if (unlikely(kw_args > 0)) {
16326  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateTriangularMeshFromRectangularGrid") < 0)) __PYX_ERR(1, 415, __pyx_L3_error)
16327  }
16328  } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
16329  goto __pyx_L5_argtuple_error;
16330  } else {
16331  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16332  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16333  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16334  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16335  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
16336  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
16337  }
16338  __pyx_v_nx = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 415, __pyx_L3_error)
16339  __pyx_v_ny = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ny == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 416, __pyx_L3_error)
16340  __pyx_v_Lx = __pyx_PyFloat_AsDouble(values[2]); if (unlikely((__pyx_v_Lx == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 417, __pyx_L3_error)
16341  __pyx_v_Ly = __pyx_PyFloat_AsDouble(values[3]); if (unlikely((__pyx_v_Ly == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 418, __pyx_L3_error)
16342  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[4]);
16343  __pyx_v_triangleFlag = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_triangleFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 420, __pyx_L3_error)
16344  }
16345  goto __pyx_L4_argument_unpacking_done;
16346  __pyx_L5_argtuple_error:;
16347  __Pyx_RaiseArgtupleInvalid("generateTriangularMeshFromRectangularGrid", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 415, __pyx_L3_error)
16348  __pyx_L3_error:;
16349  __Pyx_AddTraceback("cmeshTools.generateTriangularMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
16350  __Pyx_RefNannyFinishContext();
16351  return NULL;
16352  __pyx_L4_argument_unpacking_done:;
16353  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 419, __pyx_L1_error)
16354  __pyx_r = __pyx_pf_10cmeshTools_38generateTriangularMeshFromRectangularGrid(__pyx_self, __pyx_v_nx, __pyx_v_ny, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh, __pyx_v_triangleFlag);
16355 
16356  /* function exit code */
16357  goto __pyx_L0;
16358  __pyx_L1_error:;
16359  __pyx_r = NULL;
16360  __pyx_L0:;
16361  __Pyx_RefNannyFinishContext();
16362  return __pyx_r;
16363 }
16364 
16365 static PyObject *__pyx_pf_10cmeshTools_38generateTriangularMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, int __pyx_v_triangleFlag) {
16366  PyObject *__pyx_r = NULL;
16367  __Pyx_RefNannyDeclarations
16368  PyObject *__pyx_t_1 = NULL;
16369  __Pyx_RefNannySetupContext("generateTriangularMeshFromRectangularGrid", 0);
16370  __Pyx_XDECREF(__pyx_r);
16371  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateTriangularMeshFromRectangularGrid(__pyx_v_nx, __pyx_v_ny, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh, __pyx_v_triangleFlag, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 415, __pyx_L1_error)
16372  __Pyx_GOTREF(__pyx_t_1);
16373  __pyx_r = __pyx_t_1;
16374  __pyx_t_1 = 0;
16375  goto __pyx_L0;
16376 
16377  /* function exit code */
16378  __pyx_L1_error:;
16379  __Pyx_XDECREF(__pyx_t_1);
16380  __Pyx_AddTraceback("cmeshTools.generateTriangularMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
16381  __pyx_r = NULL;
16382  __pyx_L0:;
16383  __Pyx_XGIVEREF(__pyx_r);
16384  __Pyx_RefNannyFinishContext();
16385  return __pyx_r;
16386 }
16387 
16388 /* "cmeshTools.pyx":426
16389  * cppm.regularRectangularToTriangularElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16390  *
16391  * cpdef void generateHexahedralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16392  * int ny,
16393  * int nz,
16394  */
16395 
16396 static PyObject *__pyx_pw_10cmeshTools_41generateHexahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16397 static void __pyx_f_10cmeshTools_generateHexahedralMeshFromRectangularGrid(int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, int __pyx_v_px, int __pyx_v_py, int __pyx_v_pz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
16398  __Pyx_RefNannyDeclarations
16399  __Pyx_RefNannySetupContext("generateHexahedralMeshFromRectangularGrid", 0);
16400 
16401  /* "cmeshTools.pyx":436
16402  * double Lz,
16403  * CMesh cmesh):
16404  * cppm.regularHexahedralMeshElements(nx,ny,nz,px,py,pz,cmesh.mesh); # <<<<<<<<<<<<<<
16405  * cppm.regularMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
16406  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
16407  */
16408  (void)(regularHexahedralMeshElements(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_px, __pyx_v_py, __pyx_v_pz, __pyx_v_cmesh->mesh));
16409 
16410  /* "cmeshTools.pyx":437
16411  * CMesh cmesh):
16412  * cppm.regularHexahedralMeshElements(nx,ny,nz,px,py,pz,cmesh.mesh);
16413  * cppm.regularMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh); # <<<<<<<<<<<<<<
16414  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
16415  * cppm.regularHexahedralMeshElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
16416  */
16417  (void)(regularMeshNodes(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh->mesh));
16418 
16419  /* "cmeshTools.pyx":438
16420  * cppm.regularHexahedralMeshElements(nx,ny,nz,px,py,pz,cmesh.mesh);
16421  * cppm.regularMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
16422  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh); # <<<<<<<<<<<<<<
16423  * cppm.regularHexahedralMeshElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
16424  *
16425  */
16426  (void)(constructElementBoundaryElementsArray_hexahedron(__pyx_v_cmesh->mesh));
16427 
16428  /* "cmeshTools.pyx":439
16429  * cppm.regularMeshNodes(nx,ny,nz,Lx,Ly,Lz,cmesh.mesh);
16430  * cppm.constructElementBoundaryElementsArray_hexahedron(cmesh.mesh);
16431  * cppm.regularHexahedralMeshElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh); # <<<<<<<<<<<<<<
16432  *
16433  * cpdef void generateQuadrilateralMeshFromRectangularGrid(int nx,
16434  */
16435  (void)(regularHexahedralMeshElementBoundaryMaterials(__pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh->mesh));
16436 
16437  /* "cmeshTools.pyx":426
16438  * cppm.regularRectangularToTriangularElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16439  *
16440  * cpdef void generateHexahedralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16441  * int ny,
16442  * int nz,
16443  */
16444 
16445  /* function exit code */
16446  __Pyx_RefNannyFinishContext();
16447 }
16448 
16449 /* Python wrapper */
16450 static PyObject *__pyx_pw_10cmeshTools_41generateHexahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16451 static PyObject *__pyx_pw_10cmeshTools_41generateHexahedralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16452  int __pyx_v_nx;
16453  int __pyx_v_ny;
16454  int __pyx_v_nz;
16455  int __pyx_v_px;
16456  int __pyx_v_py;
16457  int __pyx_v_pz;
16458  double __pyx_v_Lx;
16459  double __pyx_v_Ly;
16460  double __pyx_v_Lz;
16461  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
16462  PyObject *__pyx_r = 0;
16463  __Pyx_RefNannyDeclarations
16464  __Pyx_RefNannySetupContext("generateHexahedralMeshFromRectangularGrid (wrapper)", 0);
16465  {
16466  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nx,&__pyx_n_s_ny,&__pyx_n_s_nz,&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_pz,&__pyx_n_s_Lx,&__pyx_n_s_Ly,&__pyx_n_s_Lz,&__pyx_n_s_cmesh,0};
16467  PyObject* values[10] = {0,0,0,0,0,0,0,0,0,0};
16468  if (unlikely(__pyx_kwds)) {
16469  Py_ssize_t kw_args;
16470  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16471  switch (pos_args) {
16472  case 10: values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
16473  CYTHON_FALLTHROUGH;
16474  case 9: values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
16475  CYTHON_FALLTHROUGH;
16476  case 8: values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
16477  CYTHON_FALLTHROUGH;
16478  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
16479  CYTHON_FALLTHROUGH;
16480  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
16481  CYTHON_FALLTHROUGH;
16482  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
16483  CYTHON_FALLTHROUGH;
16484  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16485  CYTHON_FALLTHROUGH;
16486  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16487  CYTHON_FALLTHROUGH;
16488  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16489  CYTHON_FALLTHROUGH;
16490  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16491  CYTHON_FALLTHROUGH;
16492  case 0: break;
16493  default: goto __pyx_L5_argtuple_error;
16494  }
16495  kw_args = PyDict_Size(__pyx_kwds);
16496  switch (pos_args) {
16497  case 0:
16498  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;
16499  else goto __pyx_L5_argtuple_error;
16500  CYTHON_FALLTHROUGH;
16501  case 1:
16502  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ny)) != 0)) kw_args--;
16503  else {
16504  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 1); __PYX_ERR(1, 426, __pyx_L3_error)
16505  }
16506  CYTHON_FALLTHROUGH;
16507  case 2:
16508  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nz)) != 0)) kw_args--;
16509  else {
16510  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 2); __PYX_ERR(1, 426, __pyx_L3_error)
16511  }
16512  CYTHON_FALLTHROUGH;
16513  case 3:
16514  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--;
16515  else {
16516  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 3); __PYX_ERR(1, 426, __pyx_L3_error)
16517  }
16518  CYTHON_FALLTHROUGH;
16519  case 4:
16520  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--;
16521  else {
16522  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 4); __PYX_ERR(1, 426, __pyx_L3_error)
16523  }
16524  CYTHON_FALLTHROUGH;
16525  case 5:
16526  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pz)) != 0)) kw_args--;
16527  else {
16528  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 5); __PYX_ERR(1, 426, __pyx_L3_error)
16529  }
16530  CYTHON_FALLTHROUGH;
16531  case 6:
16532  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lx)) != 0)) kw_args--;
16533  else {
16534  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 6); __PYX_ERR(1, 426, __pyx_L3_error)
16535  }
16536  CYTHON_FALLTHROUGH;
16537  case 7:
16538  if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Ly)) != 0)) kw_args--;
16539  else {
16540  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 7); __PYX_ERR(1, 426, __pyx_L3_error)
16541  }
16542  CYTHON_FALLTHROUGH;
16543  case 8:
16544  if (likely((values[8] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lz)) != 0)) kw_args--;
16545  else {
16546  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 8); __PYX_ERR(1, 426, __pyx_L3_error)
16547  }
16548  CYTHON_FALLTHROUGH;
16549  case 9:
16550  if (likely((values[9] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
16551  else {
16552  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, 9); __PYX_ERR(1, 426, __pyx_L3_error)
16553  }
16554  }
16555  if (unlikely(kw_args > 0)) {
16556  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateHexahedralMeshFromRectangularGrid") < 0)) __PYX_ERR(1, 426, __pyx_L3_error)
16557  }
16558  } else if (PyTuple_GET_SIZE(__pyx_args) != 10) {
16559  goto __pyx_L5_argtuple_error;
16560  } else {
16561  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16562  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16563  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16564  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16565  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
16566  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
16567  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
16568  values[7] = PyTuple_GET_ITEM(__pyx_args, 7);
16569  values[8] = PyTuple_GET_ITEM(__pyx_args, 8);
16570  values[9] = PyTuple_GET_ITEM(__pyx_args, 9);
16571  }
16572  __pyx_v_nx = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 426, __pyx_L3_error)
16573  __pyx_v_ny = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ny == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 427, __pyx_L3_error)
16574  __pyx_v_nz = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_nz == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 428, __pyx_L3_error)
16575  __pyx_v_px = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_px == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 429, __pyx_L3_error)
16576  __pyx_v_py = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_py == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 430, __pyx_L3_error)
16577  __pyx_v_pz = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_pz == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 431, __pyx_L3_error)
16578  __pyx_v_Lx = __pyx_PyFloat_AsDouble(values[6]); if (unlikely((__pyx_v_Lx == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 432, __pyx_L3_error)
16579  __pyx_v_Ly = __pyx_PyFloat_AsDouble(values[7]); if (unlikely((__pyx_v_Ly == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 433, __pyx_L3_error)
16580  __pyx_v_Lz = __pyx_PyFloat_AsDouble(values[8]); if (unlikely((__pyx_v_Lz == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 434, __pyx_L3_error)
16581  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[9]);
16582  }
16583  goto __pyx_L4_argument_unpacking_done;
16584  __pyx_L5_argtuple_error:;
16585  __Pyx_RaiseArgtupleInvalid("generateHexahedralMeshFromRectangularGrid", 1, 10, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 426, __pyx_L3_error)
16586  __pyx_L3_error:;
16587  __Pyx_AddTraceback("cmeshTools.generateHexahedralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
16588  __Pyx_RefNannyFinishContext();
16589  return NULL;
16590  __pyx_L4_argument_unpacking_done:;
16591  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 435, __pyx_L1_error)
16592  __pyx_r = __pyx_pf_10cmeshTools_40generateHexahedralMeshFromRectangularGrid(__pyx_self, __pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_px, __pyx_v_py, __pyx_v_pz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh);
16593 
16594  /* function exit code */
16595  goto __pyx_L0;
16596  __pyx_L1_error:;
16597  __pyx_r = NULL;
16598  __pyx_L0:;
16599  __Pyx_RefNannyFinishContext();
16600  return __pyx_r;
16601 }
16602 
16603 static PyObject *__pyx_pf_10cmeshTools_40generateHexahedralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_nz, int __pyx_v_px, int __pyx_v_py, int __pyx_v_pz, double __pyx_v_Lx, double __pyx_v_Ly, double __pyx_v_Lz, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
16604  PyObject *__pyx_r = NULL;
16605  __Pyx_RefNannyDeclarations
16606  PyObject *__pyx_t_1 = NULL;
16607  __Pyx_RefNannySetupContext("generateHexahedralMeshFromRectangularGrid", 0);
16608  __Pyx_XDECREF(__pyx_r);
16609  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateHexahedralMeshFromRectangularGrid(__pyx_v_nx, __pyx_v_ny, __pyx_v_nz, __pyx_v_px, __pyx_v_py, __pyx_v_pz, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_Lz, __pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 426, __pyx_L1_error)
16610  __Pyx_GOTREF(__pyx_t_1);
16611  __pyx_r = __pyx_t_1;
16612  __pyx_t_1 = 0;
16613  goto __pyx_L0;
16614 
16615  /* function exit code */
16616  __pyx_L1_error:;
16617  __Pyx_XDECREF(__pyx_t_1);
16618  __Pyx_AddTraceback("cmeshTools.generateHexahedralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
16619  __pyx_r = NULL;
16620  __pyx_L0:;
16621  __Pyx_XGIVEREF(__pyx_r);
16622  __Pyx_RefNannyFinishContext();
16623  return __pyx_r;
16624 }
16625 
16626 /* "cmeshTools.pyx":441
16627  * cppm.regularHexahedralMeshElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
16628  *
16629  * cpdef void generateQuadrilateralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16630  * int ny,
16631  * int px,
16632  */
16633 
16634 static PyObject *__pyx_pw_10cmeshTools_43generateQuadrilateralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16635 static void __pyx_f_10cmeshTools_generateQuadrilateralMeshFromRectangularGrid(int __pyx_v_nx, int __pyx_v_ny, CYTHON_UNUSED int __pyx_v_px, CYTHON_UNUSED int __pyx_v_py, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
16636  __Pyx_RefNannyDeclarations
16637  __Pyx_RefNannySetupContext("generateQuadrilateralMeshFromRectangularGrid", 0);
16638 
16639  /* "cmeshTools.pyx":448
16640  * double Ly,
16641  * CMesh cmesh):
16642  * cppm.regularQuadrilateralMeshElements(nx,ny,cmesh.mesh); # <<<<<<<<<<<<<<
16643  * cppm.regularMeshNodes2D(nx,ny,Lx,Ly,cmesh.mesh);
16644  * cppm.constructElementBoundaryElementsArray_quadrilateral(cmesh.mesh);
16645  */
16646  (void)(regularQuadrilateralMeshElements(__pyx_v_nx, __pyx_v_ny, __pyx_v_cmesh->mesh));
16647 
16648  /* "cmeshTools.pyx":449
16649  * CMesh cmesh):
16650  * cppm.regularQuadrilateralMeshElements(nx,ny,cmesh.mesh);
16651  * cppm.regularMeshNodes2D(nx,ny,Lx,Ly,cmesh.mesh); # <<<<<<<<<<<<<<
16652  * cppm.constructElementBoundaryElementsArray_quadrilateral(cmesh.mesh);
16653  * cppm.regularQuadrilateralMeshElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16654  */
16655  (void)(regularMeshNodes2D(__pyx_v_nx, __pyx_v_ny, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh->mesh));
16656 
16657  /* "cmeshTools.pyx":450
16658  * cppm.regularQuadrilateralMeshElements(nx,ny,cmesh.mesh);
16659  * cppm.regularMeshNodes2D(nx,ny,Lx,Ly,cmesh.mesh);
16660  * cppm.constructElementBoundaryElementsArray_quadrilateral(cmesh.mesh); # <<<<<<<<<<<<<<
16661  * cppm.regularQuadrilateralMeshElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16662  *
16663  */
16664  (void)(constructElementBoundaryElementsArray_quadrilateral(__pyx_v_cmesh->mesh));
16665 
16666  /* "cmeshTools.pyx":451
16667  * cppm.regularMeshNodes2D(nx,ny,Lx,Ly,cmesh.mesh);
16668  * cppm.constructElementBoundaryElementsArray_quadrilateral(cmesh.mesh);
16669  * cppm.regularQuadrilateralMeshElementBoundaryMaterials(Lx,Ly,cmesh.mesh); # <<<<<<<<<<<<<<
16670  *
16671  * cpdef void computeGeometricInfo_triangle(CMesh cmesh):
16672  */
16673  (void)(regularQuadrilateralMeshElementBoundaryMaterials(__pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh->mesh));
16674 
16675  /* "cmeshTools.pyx":441
16676  * cppm.regularHexahedralMeshElementBoundaryMaterials(Lx,Ly,Lz,cmesh.mesh);
16677  *
16678  * cpdef void generateQuadrilateralMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16679  * int ny,
16680  * int px,
16681  */
16682 
16683  /* function exit code */
16684  __Pyx_RefNannyFinishContext();
16685 }
16686 
16687 /* Python wrapper */
16688 static PyObject *__pyx_pw_10cmeshTools_43generateQuadrilateralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16689 static PyObject *__pyx_pw_10cmeshTools_43generateQuadrilateralMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
16690  int __pyx_v_nx;
16691  int __pyx_v_ny;
16692  int __pyx_v_px;
16693  int __pyx_v_py;
16694  double __pyx_v_Lx;
16695  double __pyx_v_Ly;
16696  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
16697  PyObject *__pyx_r = 0;
16698  __Pyx_RefNannyDeclarations
16699  __Pyx_RefNannySetupContext("generateQuadrilateralMeshFromRectangularGrid (wrapper)", 0);
16700  {
16701  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nx,&__pyx_n_s_ny,&__pyx_n_s_px,&__pyx_n_s_py,&__pyx_n_s_Lx,&__pyx_n_s_Ly,&__pyx_n_s_cmesh,0};
16702  PyObject* values[7] = {0,0,0,0,0,0,0};
16703  if (unlikely(__pyx_kwds)) {
16704  Py_ssize_t kw_args;
16705  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
16706  switch (pos_args) {
16707  case 7: values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
16708  CYTHON_FALLTHROUGH;
16709  case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
16710  CYTHON_FALLTHROUGH;
16711  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
16712  CYTHON_FALLTHROUGH;
16713  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16714  CYTHON_FALLTHROUGH;
16715  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16716  CYTHON_FALLTHROUGH;
16717  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16718  CYTHON_FALLTHROUGH;
16719  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16720  CYTHON_FALLTHROUGH;
16721  case 0: break;
16722  default: goto __pyx_L5_argtuple_error;
16723  }
16724  kw_args = PyDict_Size(__pyx_kwds);
16725  switch (pos_args) {
16726  case 0:
16727  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;
16728  else goto __pyx_L5_argtuple_error;
16729  CYTHON_FALLTHROUGH;
16730  case 1:
16731  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ny)) != 0)) kw_args--;
16732  else {
16733  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 1); __PYX_ERR(1, 441, __pyx_L3_error)
16734  }
16735  CYTHON_FALLTHROUGH;
16736  case 2:
16737  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_px)) != 0)) kw_args--;
16738  else {
16739  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 2); __PYX_ERR(1, 441, __pyx_L3_error)
16740  }
16741  CYTHON_FALLTHROUGH;
16742  case 3:
16743  if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_py)) != 0)) kw_args--;
16744  else {
16745  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 3); __PYX_ERR(1, 441, __pyx_L3_error)
16746  }
16747  CYTHON_FALLTHROUGH;
16748  case 4:
16749  if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lx)) != 0)) kw_args--;
16750  else {
16751  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 4); __PYX_ERR(1, 441, __pyx_L3_error)
16752  }
16753  CYTHON_FALLTHROUGH;
16754  case 5:
16755  if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Ly)) != 0)) kw_args--;
16756  else {
16757  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 5); __PYX_ERR(1, 441, __pyx_L3_error)
16758  }
16759  CYTHON_FALLTHROUGH;
16760  case 6:
16761  if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
16762  else {
16763  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, 6); __PYX_ERR(1, 441, __pyx_L3_error)
16764  }
16765  }
16766  if (unlikely(kw_args > 0)) {
16767  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateQuadrilateralMeshFromRectangularGrid") < 0)) __PYX_ERR(1, 441, __pyx_L3_error)
16768  }
16769  } else if (PyTuple_GET_SIZE(__pyx_args) != 7) {
16770  goto __pyx_L5_argtuple_error;
16771  } else {
16772  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
16773  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
16774  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
16775  values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
16776  values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
16777  values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
16778  values[6] = PyTuple_GET_ITEM(__pyx_args, 6);
16779  }
16780  __pyx_v_nx = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 441, __pyx_L3_error)
16781  __pyx_v_ny = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ny == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 442, __pyx_L3_error)
16782  __pyx_v_px = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_px == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 443, __pyx_L3_error)
16783  __pyx_v_py = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_py == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 444, __pyx_L3_error)
16784  __pyx_v_Lx = __pyx_PyFloat_AsDouble(values[4]); if (unlikely((__pyx_v_Lx == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 445, __pyx_L3_error)
16785  __pyx_v_Ly = __pyx_PyFloat_AsDouble(values[5]); if (unlikely((__pyx_v_Ly == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 446, __pyx_L3_error)
16786  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[6]);
16787  }
16788  goto __pyx_L4_argument_unpacking_done;
16789  __pyx_L5_argtuple_error:;
16790  __Pyx_RaiseArgtupleInvalid("generateQuadrilateralMeshFromRectangularGrid", 1, 7, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 441, __pyx_L3_error)
16791  __pyx_L3_error:;
16792  __Pyx_AddTraceback("cmeshTools.generateQuadrilateralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
16793  __Pyx_RefNannyFinishContext();
16794  return NULL;
16795  __pyx_L4_argument_unpacking_done:;
16796  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 447, __pyx_L1_error)
16797  __pyx_r = __pyx_pf_10cmeshTools_42generateQuadrilateralMeshFromRectangularGrid(__pyx_self, __pyx_v_nx, __pyx_v_ny, __pyx_v_px, __pyx_v_py, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh);
16798 
16799  /* function exit code */
16800  goto __pyx_L0;
16801  __pyx_L1_error:;
16802  __pyx_r = NULL;
16803  __pyx_L0:;
16804  __Pyx_RefNannyFinishContext();
16805  return __pyx_r;
16806 }
16807 
16808 static PyObject *__pyx_pf_10cmeshTools_42generateQuadrilateralMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, int __pyx_v_ny, int __pyx_v_px, int __pyx_v_py, double __pyx_v_Lx, double __pyx_v_Ly, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
16809  PyObject *__pyx_r = NULL;
16810  __Pyx_RefNannyDeclarations
16811  PyObject *__pyx_t_1 = NULL;
16812  __Pyx_RefNannySetupContext("generateQuadrilateralMeshFromRectangularGrid", 0);
16813  __Pyx_XDECREF(__pyx_r);
16814  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateQuadrilateralMeshFromRectangularGrid(__pyx_v_nx, __pyx_v_ny, __pyx_v_px, __pyx_v_py, __pyx_v_Lx, __pyx_v_Ly, __pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 441, __pyx_L1_error)
16815  __Pyx_GOTREF(__pyx_t_1);
16816  __pyx_r = __pyx_t_1;
16817  __pyx_t_1 = 0;
16818  goto __pyx_L0;
16819 
16820  /* function exit code */
16821  __pyx_L1_error:;
16822  __Pyx_XDECREF(__pyx_t_1);
16823  __Pyx_AddTraceback("cmeshTools.generateQuadrilateralMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
16824  __pyx_r = NULL;
16825  __pyx_L0:;
16826  __Pyx_XGIVEREF(__pyx_r);
16827  __Pyx_RefNannyFinishContext();
16828  return __pyx_r;
16829 }
16830 
16831 /* "cmeshTools.pyx":453
16832  * cppm.regularQuadrilateralMeshElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16833  *
16834  * cpdef void computeGeometricInfo_triangle(CMesh cmesh): # <<<<<<<<<<<<<<
16835  * cppm.computeGeometricInfo_triangle(cmesh.mesh);
16836  *
16837  */
16838 
16839 static PyObject *__pyx_pw_10cmeshTools_45computeGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16840 static void __pyx_f_10cmeshTools_computeGeometricInfo_triangle(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
16841  __Pyx_RefNannyDeclarations
16842  __Pyx_RefNannySetupContext("computeGeometricInfo_triangle", 0);
16843 
16844  /* "cmeshTools.pyx":454
16845  *
16846  * cpdef void computeGeometricInfo_triangle(CMesh cmesh):
16847  * cppm.computeGeometricInfo_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
16848  *
16849  * cpdef void allocateGeometricInfo_triangle(CMesh cmesh):
16850  */
16851  (void)(computeGeometricInfo_triangle(__pyx_v_cmesh->mesh));
16852 
16853  /* "cmeshTools.pyx":453
16854  * cppm.regularQuadrilateralMeshElementBoundaryMaterials(Lx,Ly,cmesh.mesh);
16855  *
16856  * cpdef void computeGeometricInfo_triangle(CMesh cmesh): # <<<<<<<<<<<<<<
16857  * cppm.computeGeometricInfo_triangle(cmesh.mesh);
16858  *
16859  */
16860 
16861  /* function exit code */
16862  __Pyx_RefNannyFinishContext();
16863 }
16864 
16865 /* Python wrapper */
16866 static PyObject *__pyx_pw_10cmeshTools_45computeGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16867 static PyObject *__pyx_pw_10cmeshTools_45computeGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
16868  PyObject *__pyx_r = 0;
16869  __Pyx_RefNannyDeclarations
16870  __Pyx_RefNannySetupContext("computeGeometricInfo_triangle (wrapper)", 0);
16871  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 453, __pyx_L1_error)
16872  __pyx_r = __pyx_pf_10cmeshTools_44computeGeometricInfo_triangle(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
16873 
16874  /* function exit code */
16875  goto __pyx_L0;
16876  __pyx_L1_error:;
16877  __pyx_r = NULL;
16878  __pyx_L0:;
16879  __Pyx_RefNannyFinishContext();
16880  return __pyx_r;
16881 }
16882 
16883 static PyObject *__pyx_pf_10cmeshTools_44computeGeometricInfo_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
16884  PyObject *__pyx_r = NULL;
16885  __Pyx_RefNannyDeclarations
16886  PyObject *__pyx_t_1 = NULL;
16887  __Pyx_RefNannySetupContext("computeGeometricInfo_triangle", 0);
16888  __Pyx_XDECREF(__pyx_r);
16889  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_triangle(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 453, __pyx_L1_error)
16890  __Pyx_GOTREF(__pyx_t_1);
16891  __pyx_r = __pyx_t_1;
16892  __pyx_t_1 = 0;
16893  goto __pyx_L0;
16894 
16895  /* function exit code */
16896  __pyx_L1_error:;
16897  __Pyx_XDECREF(__pyx_t_1);
16898  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename);
16899  __pyx_r = NULL;
16900  __pyx_L0:;
16901  __Pyx_XGIVEREF(__pyx_r);
16902  __Pyx_RefNannyFinishContext();
16903  return __pyx_r;
16904 }
16905 
16906 /* "cmeshTools.pyx":456
16907  * cppm.computeGeometricInfo_triangle(cmesh.mesh);
16908  *
16909  * cpdef void allocateGeometricInfo_triangle(CMesh cmesh): # <<<<<<<<<<<<<<
16910  * cppm.allocateGeometricInfo_triangle(cmesh.mesh);
16911  *
16912  */
16913 
16914 static PyObject *__pyx_pw_10cmeshTools_47allocateGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16915 static void __pyx_f_10cmeshTools_allocateGeometricInfo_triangle(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
16916  __Pyx_RefNannyDeclarations
16917  __Pyx_RefNannySetupContext("allocateGeometricInfo_triangle", 0);
16918 
16919  /* "cmeshTools.pyx":457
16920  *
16921  * cpdef void allocateGeometricInfo_triangle(CMesh cmesh):
16922  * cppm.allocateGeometricInfo_triangle(cmesh.mesh); # <<<<<<<<<<<<<<
16923  *
16924  * cpdef void generateEdgeMeshFromRectangularGrid(int nx,
16925  */
16926  (void)(allocateGeometricInfo_triangle(__pyx_v_cmesh->mesh));
16927 
16928  /* "cmeshTools.pyx":456
16929  * cppm.computeGeometricInfo_triangle(cmesh.mesh);
16930  *
16931  * cpdef void allocateGeometricInfo_triangle(CMesh cmesh): # <<<<<<<<<<<<<<
16932  * cppm.allocateGeometricInfo_triangle(cmesh.mesh);
16933  *
16934  */
16935 
16936  /* function exit code */
16937  __Pyx_RefNannyFinishContext();
16938 }
16939 
16940 /* Python wrapper */
16941 static PyObject *__pyx_pw_10cmeshTools_47allocateGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
16942 static PyObject *__pyx_pw_10cmeshTools_47allocateGeometricInfo_triangle(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
16943  PyObject *__pyx_r = 0;
16944  __Pyx_RefNannyDeclarations
16945  __Pyx_RefNannySetupContext("allocateGeometricInfo_triangle (wrapper)", 0);
16946  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 456, __pyx_L1_error)
16947  __pyx_r = __pyx_pf_10cmeshTools_46allocateGeometricInfo_triangle(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
16948 
16949  /* function exit code */
16950  goto __pyx_L0;
16951  __pyx_L1_error:;
16952  __pyx_r = NULL;
16953  __pyx_L0:;
16954  __Pyx_RefNannyFinishContext();
16955  return __pyx_r;
16956 }
16957 
16958 static PyObject *__pyx_pf_10cmeshTools_46allocateGeometricInfo_triangle(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
16959  PyObject *__pyx_r = NULL;
16960  __Pyx_RefNannyDeclarations
16961  PyObject *__pyx_t_1 = NULL;
16962  __Pyx_RefNannySetupContext("allocateGeometricInfo_triangle", 0);
16963  __Pyx_XDECREF(__pyx_r);
16964  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_triangle(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 456, __pyx_L1_error)
16965  __Pyx_GOTREF(__pyx_t_1);
16966  __pyx_r = __pyx_t_1;
16967  __pyx_t_1 = 0;
16968  goto __pyx_L0;
16969 
16970  /* function exit code */
16971  __pyx_L1_error:;
16972  __Pyx_XDECREF(__pyx_t_1);
16973  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_triangle", __pyx_clineno, __pyx_lineno, __pyx_filename);
16974  __pyx_r = NULL;
16975  __pyx_L0:;
16976  __Pyx_XGIVEREF(__pyx_r);
16977  __Pyx_RefNannyFinishContext();
16978  return __pyx_r;
16979 }
16980 
16981 /* "cmeshTools.pyx":459
16982  * cppm.allocateGeometricInfo_triangle(cmesh.mesh);
16983  *
16984  * cpdef void generateEdgeMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
16985  * double Lx,
16986  * CMesh cmesh):
16987  */
16988 
16989 static PyObject *__pyx_pw_10cmeshTools_49generateEdgeMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
16990 static void __pyx_f_10cmeshTools_generateEdgeMeshFromRectangularGrid(int __pyx_v_nx, double __pyx_v_Lx, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
16991  __Pyx_RefNannyDeclarations
16992  __Pyx_RefNannySetupContext("generateEdgeMeshFromRectangularGrid", 0);
16993 
16994  /* "cmeshTools.pyx":462
16995  * double Lx,
16996  * CMesh cmesh):
16997  * cppm.edgeMeshElements(nx,cmesh.mesh); # <<<<<<<<<<<<<<
16998  * cppm.regularEdgeMeshNodes(nx,Lx,cmesh.mesh);
16999  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
17000  */
17001  (void)(edgeMeshElements(__pyx_v_nx, __pyx_v_cmesh->mesh));
17002 
17003  /* "cmeshTools.pyx":463
17004  * CMesh cmesh):
17005  * cppm.edgeMeshElements(nx,cmesh.mesh);
17006  * cppm.regularEdgeMeshNodes(nx,Lx,cmesh.mesh); # <<<<<<<<<<<<<<
17007  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
17008  *
17009  */
17010  (void)(regularEdgeMeshNodes(__pyx_v_nx, __pyx_v_Lx, __pyx_v_cmesh->mesh));
17011 
17012  /* "cmeshTools.pyx":464
17013  * cppm.edgeMeshElements(nx,cmesh.mesh);
17014  * cppm.regularEdgeMeshNodes(nx,Lx,cmesh.mesh);
17015  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh); # <<<<<<<<<<<<<<
17016  *
17017  * cpdef void computeGeometricInfo_edge(CMesh cmesh):
17018  */
17019  (void)(constructElementBoundaryElementsArray_edge(__pyx_v_cmesh->mesh));
17020 
17021  /* "cmeshTools.pyx":459
17022  * cppm.allocateGeometricInfo_triangle(cmesh.mesh);
17023  *
17024  * cpdef void generateEdgeMeshFromRectangularGrid(int nx, # <<<<<<<<<<<<<<
17025  * double Lx,
17026  * CMesh cmesh):
17027  */
17028 
17029  /* function exit code */
17030  __Pyx_RefNannyFinishContext();
17031 }
17032 
17033 /* Python wrapper */
17034 static PyObject *__pyx_pw_10cmeshTools_49generateEdgeMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17035 static PyObject *__pyx_pw_10cmeshTools_49generateEdgeMeshFromRectangularGrid(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17036  int __pyx_v_nx;
17037  double __pyx_v_Lx;
17038  struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh = 0;
17039  PyObject *__pyx_r = 0;
17040  __Pyx_RefNannyDeclarations
17041  __Pyx_RefNannySetupContext("generateEdgeMeshFromRectangularGrid (wrapper)", 0);
17042  {
17043  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nx,&__pyx_n_s_Lx,&__pyx_n_s_cmesh,0};
17044  PyObject* values[3] = {0,0,0};
17045  if (unlikely(__pyx_kwds)) {
17046  Py_ssize_t kw_args;
17047  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17048  switch (pos_args) {
17049  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17050  CYTHON_FALLTHROUGH;
17051  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17052  CYTHON_FALLTHROUGH;
17053  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17054  CYTHON_FALLTHROUGH;
17055  case 0: break;
17056  default: goto __pyx_L5_argtuple_error;
17057  }
17058  kw_args = PyDict_Size(__pyx_kwds);
17059  switch (pos_args) {
17060  case 0:
17061  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nx)) != 0)) kw_args--;
17062  else goto __pyx_L5_argtuple_error;
17063  CYTHON_FALLTHROUGH;
17064  case 1:
17065  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_Lx)) != 0)) kw_args--;
17066  else {
17067  __Pyx_RaiseArgtupleInvalid("generateEdgeMeshFromRectangularGrid", 1, 3, 3, 1); __PYX_ERR(1, 459, __pyx_L3_error)
17068  }
17069  CYTHON_FALLTHROUGH;
17070  case 2:
17071  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmesh)) != 0)) kw_args--;
17072  else {
17073  __Pyx_RaiseArgtupleInvalid("generateEdgeMeshFromRectangularGrid", 1, 3, 3, 2); __PYX_ERR(1, 459, __pyx_L3_error)
17074  }
17075  }
17076  if (unlikely(kw_args > 0)) {
17077  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generateEdgeMeshFromRectangularGrid") < 0)) __PYX_ERR(1, 459, __pyx_L3_error)
17078  }
17079  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
17080  goto __pyx_L5_argtuple_error;
17081  } else {
17082  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17083  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17084  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17085  }
17086  __pyx_v_nx = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nx == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 459, __pyx_L3_error)
17087  __pyx_v_Lx = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_Lx == (double)-1) && PyErr_Occurred())) __PYX_ERR(1, 460, __pyx_L3_error)
17088  __pyx_v_cmesh = ((struct __pyx_obj_10cmeshTools_CMesh *)values[2]);
17089  }
17090  goto __pyx_L4_argument_unpacking_done;
17091  __pyx_L5_argtuple_error:;
17092  __Pyx_RaiseArgtupleInvalid("generateEdgeMeshFromRectangularGrid", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 459, __pyx_L3_error)
17093  __pyx_L3_error:;
17094  __Pyx_AddTraceback("cmeshTools.generateEdgeMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
17095  __Pyx_RefNannyFinishContext();
17096  return NULL;
17097  __pyx_L4_argument_unpacking_done:;
17098  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 461, __pyx_L1_error)
17099  __pyx_r = __pyx_pf_10cmeshTools_48generateEdgeMeshFromRectangularGrid(__pyx_self, __pyx_v_nx, __pyx_v_Lx, __pyx_v_cmesh);
17100 
17101  /* function exit code */
17102  goto __pyx_L0;
17103  __pyx_L1_error:;
17104  __pyx_r = NULL;
17105  __pyx_L0:;
17106  __Pyx_RefNannyFinishContext();
17107  return __pyx_r;
17108 }
17109 
17110 static PyObject *__pyx_pf_10cmeshTools_48generateEdgeMeshFromRectangularGrid(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nx, double __pyx_v_Lx, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17111  PyObject *__pyx_r = NULL;
17112  __Pyx_RefNannyDeclarations
17113  PyObject *__pyx_t_1 = NULL;
17114  __Pyx_RefNannySetupContext("generateEdgeMeshFromRectangularGrid", 0);
17115  __Pyx_XDECREF(__pyx_r);
17116  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_generateEdgeMeshFromRectangularGrid(__pyx_v_nx, __pyx_v_Lx, __pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 459, __pyx_L1_error)
17117  __Pyx_GOTREF(__pyx_t_1);
17118  __pyx_r = __pyx_t_1;
17119  __pyx_t_1 = 0;
17120  goto __pyx_L0;
17121 
17122  /* function exit code */
17123  __pyx_L1_error:;
17124  __Pyx_XDECREF(__pyx_t_1);
17125  __Pyx_AddTraceback("cmeshTools.generateEdgeMeshFromRectangularGrid", __pyx_clineno, __pyx_lineno, __pyx_filename);
17126  __pyx_r = NULL;
17127  __pyx_L0:;
17128  __Pyx_XGIVEREF(__pyx_r);
17129  __Pyx_RefNannyFinishContext();
17130  return __pyx_r;
17131 }
17132 
17133 /* "cmeshTools.pyx":466
17134  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
17135  *
17136  * cpdef void computeGeometricInfo_edge(CMesh cmesh): # <<<<<<<<<<<<<<
17137  * cppm.computeGeometricInfo_edge(cmesh.mesh);
17138  *
17139  */
17140 
17141 static PyObject *__pyx_pw_10cmeshTools_51computeGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17142 static void __pyx_f_10cmeshTools_computeGeometricInfo_edge(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17143  __Pyx_RefNannyDeclarations
17144  __Pyx_RefNannySetupContext("computeGeometricInfo_edge", 0);
17145 
17146  /* "cmeshTools.pyx":467
17147  *
17148  * cpdef void computeGeometricInfo_edge(CMesh cmesh):
17149  * cppm.computeGeometricInfo_edge(cmesh.mesh); # <<<<<<<<<<<<<<
17150  *
17151  * cpdef void allocateGeometricInfo_edge(CMesh cmesh):
17152  */
17153  (void)(computeGeometricInfo_edge(__pyx_v_cmesh->mesh));
17154 
17155  /* "cmeshTools.pyx":466
17156  * cppm.constructElementBoundaryElementsArray_edge(cmesh.mesh);
17157  *
17158  * cpdef void computeGeometricInfo_edge(CMesh cmesh): # <<<<<<<<<<<<<<
17159  * cppm.computeGeometricInfo_edge(cmesh.mesh);
17160  *
17161  */
17162 
17163  /* function exit code */
17164  __Pyx_RefNannyFinishContext();
17165 }
17166 
17167 /* Python wrapper */
17168 static PyObject *__pyx_pw_10cmeshTools_51computeGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17169 static PyObject *__pyx_pw_10cmeshTools_51computeGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17170  PyObject *__pyx_r = 0;
17171  __Pyx_RefNannyDeclarations
17172  __Pyx_RefNannySetupContext("computeGeometricInfo_edge (wrapper)", 0);
17173  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 466, __pyx_L1_error)
17174  __pyx_r = __pyx_pf_10cmeshTools_50computeGeometricInfo_edge(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17175 
17176  /* function exit code */
17177  goto __pyx_L0;
17178  __pyx_L1_error:;
17179  __pyx_r = NULL;
17180  __pyx_L0:;
17181  __Pyx_RefNannyFinishContext();
17182  return __pyx_r;
17183 }
17184 
17185 static PyObject *__pyx_pf_10cmeshTools_50computeGeometricInfo_edge(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17186  PyObject *__pyx_r = NULL;
17187  __Pyx_RefNannyDeclarations
17188  PyObject *__pyx_t_1 = NULL;
17189  __Pyx_RefNannySetupContext("computeGeometricInfo_edge", 0);
17190  __Pyx_XDECREF(__pyx_r);
17191  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_edge(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 466, __pyx_L1_error)
17192  __Pyx_GOTREF(__pyx_t_1);
17193  __pyx_r = __pyx_t_1;
17194  __pyx_t_1 = 0;
17195  goto __pyx_L0;
17196 
17197  /* function exit code */
17198  __pyx_L1_error:;
17199  __Pyx_XDECREF(__pyx_t_1);
17200  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_edge", __pyx_clineno, __pyx_lineno, __pyx_filename);
17201  __pyx_r = NULL;
17202  __pyx_L0:;
17203  __Pyx_XGIVEREF(__pyx_r);
17204  __Pyx_RefNannyFinishContext();
17205  return __pyx_r;
17206 }
17207 
17208 /* "cmeshTools.pyx":469
17209  * cppm.computeGeometricInfo_edge(cmesh.mesh);
17210  *
17211  * cpdef void allocateGeometricInfo_edge(CMesh cmesh): # <<<<<<<<<<<<<<
17212  * cppm.allocateGeometricInfo_edge(cmesh.mesh);
17213  *
17214  */
17215 
17216 static PyObject *__pyx_pw_10cmeshTools_53allocateGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17217 static void __pyx_f_10cmeshTools_allocateGeometricInfo_edge(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17218  __Pyx_RefNannyDeclarations
17219  __Pyx_RefNannySetupContext("allocateGeometricInfo_edge", 0);
17220 
17221  /* "cmeshTools.pyx":470
17222  *
17223  * cpdef void allocateGeometricInfo_edge(CMesh cmesh):
17224  * cppm.allocateGeometricInfo_edge(cmesh.mesh); # <<<<<<<<<<<<<<
17225  *
17226  *
17227  */
17228  (void)(allocateGeometricInfo_edge(__pyx_v_cmesh->mesh));
17229 
17230  /* "cmeshTools.pyx":469
17231  * cppm.computeGeometricInfo_edge(cmesh.mesh);
17232  *
17233  * cpdef void allocateGeometricInfo_edge(CMesh cmesh): # <<<<<<<<<<<<<<
17234  * cppm.allocateGeometricInfo_edge(cmesh.mesh);
17235  *
17236  */
17237 
17238  /* function exit code */
17239  __Pyx_RefNannyFinishContext();
17240 }
17241 
17242 /* Python wrapper */
17243 static PyObject *__pyx_pw_10cmeshTools_53allocateGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17244 static PyObject *__pyx_pw_10cmeshTools_53allocateGeometricInfo_edge(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17245  PyObject *__pyx_r = 0;
17246  __Pyx_RefNannyDeclarations
17247  __Pyx_RefNannySetupContext("allocateGeometricInfo_edge (wrapper)", 0);
17248  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 469, __pyx_L1_error)
17249  __pyx_r = __pyx_pf_10cmeshTools_52allocateGeometricInfo_edge(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17250 
17251  /* function exit code */
17252  goto __pyx_L0;
17253  __pyx_L1_error:;
17254  __pyx_r = NULL;
17255  __pyx_L0:;
17256  __Pyx_RefNannyFinishContext();
17257  return __pyx_r;
17258 }
17259 
17260 static PyObject *__pyx_pf_10cmeshTools_52allocateGeometricInfo_edge(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17261  PyObject *__pyx_r = NULL;
17262  __Pyx_RefNannyDeclarations
17263  PyObject *__pyx_t_1 = NULL;
17264  __Pyx_RefNannySetupContext("allocateGeometricInfo_edge", 0);
17265  __Pyx_XDECREF(__pyx_r);
17266  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_edge(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 469, __pyx_L1_error)
17267  __Pyx_GOTREF(__pyx_t_1);
17268  __pyx_r = __pyx_t_1;
17269  __pyx_t_1 = 0;
17270  goto __pyx_L0;
17271 
17272  /* function exit code */
17273  __pyx_L1_error:;
17274  __Pyx_XDECREF(__pyx_t_1);
17275  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_edge", __pyx_clineno, __pyx_lineno, __pyx_filename);
17276  __pyx_r = NULL;
17277  __pyx_L0:;
17278  __Pyx_XGIVEREF(__pyx_r);
17279  __Pyx_RefNannyFinishContext();
17280  return __pyx_r;
17281 }
17282 
17283 /* "cmeshTools.pyx":473
17284  *
17285  *
17286  * cpdef void computeGeometricInfo_hexahedron(CMesh cmesh): # <<<<<<<<<<<<<<
17287  * cppm.computeGeometricInfo_hexahedron(cmesh.mesh);
17288  *
17289  */
17290 
17291 static PyObject *__pyx_pw_10cmeshTools_55computeGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17292 static void __pyx_f_10cmeshTools_computeGeometricInfo_hexahedron(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17293  __Pyx_RefNannyDeclarations
17294  __Pyx_RefNannySetupContext("computeGeometricInfo_hexahedron", 0);
17295 
17296  /* "cmeshTools.pyx":474
17297  *
17298  * cpdef void computeGeometricInfo_hexahedron(CMesh cmesh):
17299  * cppm.computeGeometricInfo_hexahedron(cmesh.mesh); # <<<<<<<<<<<<<<
17300  *
17301  * cpdef void computeGeometricInfo_quadrilateral(CMesh cmesh):
17302  */
17303  (void)(computeGeometricInfo_hexahedron(__pyx_v_cmesh->mesh));
17304 
17305  /* "cmeshTools.pyx":473
17306  *
17307  *
17308  * cpdef void computeGeometricInfo_hexahedron(CMesh cmesh): # <<<<<<<<<<<<<<
17309  * cppm.computeGeometricInfo_hexahedron(cmesh.mesh);
17310  *
17311  */
17312 
17313  /* function exit code */
17314  __Pyx_RefNannyFinishContext();
17315 }
17316 
17317 /* Python wrapper */
17318 static PyObject *__pyx_pw_10cmeshTools_55computeGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17319 static PyObject *__pyx_pw_10cmeshTools_55computeGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17320  PyObject *__pyx_r = 0;
17321  __Pyx_RefNannyDeclarations
17322  __Pyx_RefNannySetupContext("computeGeometricInfo_hexahedron (wrapper)", 0);
17323  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 473, __pyx_L1_error)
17324  __pyx_r = __pyx_pf_10cmeshTools_54computeGeometricInfo_hexahedron(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17325 
17326  /* function exit code */
17327  goto __pyx_L0;
17328  __pyx_L1_error:;
17329  __pyx_r = NULL;
17330  __pyx_L0:;
17331  __Pyx_RefNannyFinishContext();
17332  return __pyx_r;
17333 }
17334 
17335 static PyObject *__pyx_pf_10cmeshTools_54computeGeometricInfo_hexahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17336  PyObject *__pyx_r = NULL;
17337  __Pyx_RefNannyDeclarations
17338  PyObject *__pyx_t_1 = NULL;
17339  __Pyx_RefNannySetupContext("computeGeometricInfo_hexahedron", 0);
17340  __Pyx_XDECREF(__pyx_r);
17341  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_hexahedron(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 473, __pyx_L1_error)
17342  __Pyx_GOTREF(__pyx_t_1);
17343  __pyx_r = __pyx_t_1;
17344  __pyx_t_1 = 0;
17345  goto __pyx_L0;
17346 
17347  /* function exit code */
17348  __pyx_L1_error:;
17349  __Pyx_XDECREF(__pyx_t_1);
17350  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_hexahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
17351  __pyx_r = NULL;
17352  __pyx_L0:;
17353  __Pyx_XGIVEREF(__pyx_r);
17354  __Pyx_RefNannyFinishContext();
17355  return __pyx_r;
17356 }
17357 
17358 /* "cmeshTools.pyx":476
17359  * cppm.computeGeometricInfo_hexahedron(cmesh.mesh);
17360  *
17361  * cpdef void computeGeometricInfo_quadrilateral(CMesh cmesh): # <<<<<<<<<<<<<<
17362  * cppm.computeGeometricInfo_quadrilateral(cmesh.mesh);
17363  *
17364  */
17365 
17366 static PyObject *__pyx_pw_10cmeshTools_57computeGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17367 static void __pyx_f_10cmeshTools_computeGeometricInfo_quadrilateral(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17368  __Pyx_RefNannyDeclarations
17369  __Pyx_RefNannySetupContext("computeGeometricInfo_quadrilateral", 0);
17370 
17371  /* "cmeshTools.pyx":477
17372  *
17373  * cpdef void computeGeometricInfo_quadrilateral(CMesh cmesh):
17374  * cppm.computeGeometricInfo_quadrilateral(cmesh.mesh); # <<<<<<<<<<<<<<
17375  *
17376  * cpdef void allocateGeometricInfo_hexahedron(CMesh cmesh):
17377  */
17378  (void)(computeGeometricInfo_quadrilateral(__pyx_v_cmesh->mesh));
17379 
17380  /* "cmeshTools.pyx":476
17381  * cppm.computeGeometricInfo_hexahedron(cmesh.mesh);
17382  *
17383  * cpdef void computeGeometricInfo_quadrilateral(CMesh cmesh): # <<<<<<<<<<<<<<
17384  * cppm.computeGeometricInfo_quadrilateral(cmesh.mesh);
17385  *
17386  */
17387 
17388  /* function exit code */
17389  __Pyx_RefNannyFinishContext();
17390 }
17391 
17392 /* Python wrapper */
17393 static PyObject *__pyx_pw_10cmeshTools_57computeGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17394 static PyObject *__pyx_pw_10cmeshTools_57computeGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17395  PyObject *__pyx_r = 0;
17396  __Pyx_RefNannyDeclarations
17397  __Pyx_RefNannySetupContext("computeGeometricInfo_quadrilateral (wrapper)", 0);
17398  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 476, __pyx_L1_error)
17399  __pyx_r = __pyx_pf_10cmeshTools_56computeGeometricInfo_quadrilateral(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17400 
17401  /* function exit code */
17402  goto __pyx_L0;
17403  __pyx_L1_error:;
17404  __pyx_r = NULL;
17405  __pyx_L0:;
17406  __Pyx_RefNannyFinishContext();
17407  return __pyx_r;
17408 }
17409 
17410 static PyObject *__pyx_pf_10cmeshTools_56computeGeometricInfo_quadrilateral(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17411  PyObject *__pyx_r = NULL;
17412  __Pyx_RefNannyDeclarations
17413  PyObject *__pyx_t_1 = NULL;
17414  __Pyx_RefNannySetupContext("computeGeometricInfo_quadrilateral", 0);
17415  __Pyx_XDECREF(__pyx_r);
17416  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_quadrilateral(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 476, __pyx_L1_error)
17417  __Pyx_GOTREF(__pyx_t_1);
17418  __pyx_r = __pyx_t_1;
17419  __pyx_t_1 = 0;
17420  goto __pyx_L0;
17421 
17422  /* function exit code */
17423  __pyx_L1_error:;
17424  __Pyx_XDECREF(__pyx_t_1);
17425  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_quadrilateral", __pyx_clineno, __pyx_lineno, __pyx_filename);
17426  __pyx_r = NULL;
17427  __pyx_L0:;
17428  __Pyx_XGIVEREF(__pyx_r);
17429  __Pyx_RefNannyFinishContext();
17430  return __pyx_r;
17431 }
17432 
17433 /* "cmeshTools.pyx":479
17434  * cppm.computeGeometricInfo_quadrilateral(cmesh.mesh);
17435  *
17436  * cpdef void allocateGeometricInfo_hexahedron(CMesh cmesh): # <<<<<<<<<<<<<<
17437  * cppm.allocateGeometricInfo_hexahedron(cmesh.mesh);
17438  *
17439  */
17440 
17441 static PyObject *__pyx_pw_10cmeshTools_59allocateGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17442 static void __pyx_f_10cmeshTools_allocateGeometricInfo_hexahedron(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17443  __Pyx_RefNannyDeclarations
17444  __Pyx_RefNannySetupContext("allocateGeometricInfo_hexahedron", 0);
17445 
17446  /* "cmeshTools.pyx":480
17447  *
17448  * cpdef void allocateGeometricInfo_hexahedron(CMesh cmesh):
17449  * cppm.allocateGeometricInfo_hexahedron(cmesh.mesh); # <<<<<<<<<<<<<<
17450  *
17451  * cpdef void allocateGeometricInfo_quadrilateral(CMesh cmesh):
17452  */
17453  (void)(allocateGeometricInfo_hexahedron(__pyx_v_cmesh->mesh));
17454 
17455  /* "cmeshTools.pyx":479
17456  * cppm.computeGeometricInfo_quadrilateral(cmesh.mesh);
17457  *
17458  * cpdef void allocateGeometricInfo_hexahedron(CMesh cmesh): # <<<<<<<<<<<<<<
17459  * cppm.allocateGeometricInfo_hexahedron(cmesh.mesh);
17460  *
17461  */
17462 
17463  /* function exit code */
17464  __Pyx_RefNannyFinishContext();
17465 }
17466 
17467 /* Python wrapper */
17468 static PyObject *__pyx_pw_10cmeshTools_59allocateGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17469 static PyObject *__pyx_pw_10cmeshTools_59allocateGeometricInfo_hexahedron(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17470  PyObject *__pyx_r = 0;
17471  __Pyx_RefNannyDeclarations
17472  __Pyx_RefNannySetupContext("allocateGeometricInfo_hexahedron (wrapper)", 0);
17473  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 479, __pyx_L1_error)
17474  __pyx_r = __pyx_pf_10cmeshTools_58allocateGeometricInfo_hexahedron(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17475 
17476  /* function exit code */
17477  goto __pyx_L0;
17478  __pyx_L1_error:;
17479  __pyx_r = NULL;
17480  __pyx_L0:;
17481  __Pyx_RefNannyFinishContext();
17482  return __pyx_r;
17483 }
17484 
17485 static PyObject *__pyx_pf_10cmeshTools_58allocateGeometricInfo_hexahedron(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17486  PyObject *__pyx_r = NULL;
17487  __Pyx_RefNannyDeclarations
17488  PyObject *__pyx_t_1 = NULL;
17489  __Pyx_RefNannySetupContext("allocateGeometricInfo_hexahedron", 0);
17490  __Pyx_XDECREF(__pyx_r);
17491  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_hexahedron(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 479, __pyx_L1_error)
17492  __Pyx_GOTREF(__pyx_t_1);
17493  __pyx_r = __pyx_t_1;
17494  __pyx_t_1 = 0;
17495  goto __pyx_L0;
17496 
17497  /* function exit code */
17498  __pyx_L1_error:;
17499  __Pyx_XDECREF(__pyx_t_1);
17500  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_hexahedron", __pyx_clineno, __pyx_lineno, __pyx_filename);
17501  __pyx_r = NULL;
17502  __pyx_L0:;
17503  __Pyx_XGIVEREF(__pyx_r);
17504  __Pyx_RefNannyFinishContext();
17505  return __pyx_r;
17506 }
17507 
17508 /* "cmeshTools.pyx":482
17509  * cppm.allocateGeometricInfo_hexahedron(cmesh.mesh);
17510  *
17511  * cpdef void allocateGeometricInfo_quadrilateral(CMesh cmesh): # <<<<<<<<<<<<<<
17512  * cppm.allocateGeometricInfo_quadrilateral(cmesh.mesh);
17513  *
17514  */
17515 
17516 static PyObject *__pyx_pw_10cmeshTools_61allocateGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17517 static void __pyx_f_10cmeshTools_allocateGeometricInfo_quadrilateral(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17518  __Pyx_RefNannyDeclarations
17519  __Pyx_RefNannySetupContext("allocateGeometricInfo_quadrilateral", 0);
17520 
17521  /* "cmeshTools.pyx":483
17522  *
17523  * cpdef void allocateGeometricInfo_quadrilateral(CMesh cmesh):
17524  * cppm.allocateGeometricInfo_quadrilateral(cmesh.mesh); # <<<<<<<<<<<<<<
17525  *
17526  * cpdef void computeGeometricInfo_NURBS(CMesh cmesh):
17527  */
17528  (void)(allocateGeometricInfo_quadrilateral(__pyx_v_cmesh->mesh));
17529 
17530  /* "cmeshTools.pyx":482
17531  * cppm.allocateGeometricInfo_hexahedron(cmesh.mesh);
17532  *
17533  * cpdef void allocateGeometricInfo_quadrilateral(CMesh cmesh): # <<<<<<<<<<<<<<
17534  * cppm.allocateGeometricInfo_quadrilateral(cmesh.mesh);
17535  *
17536  */
17537 
17538  /* function exit code */
17539  __Pyx_RefNannyFinishContext();
17540 }
17541 
17542 /* Python wrapper */
17543 static PyObject *__pyx_pw_10cmeshTools_61allocateGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17544 static PyObject *__pyx_pw_10cmeshTools_61allocateGeometricInfo_quadrilateral(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17545  PyObject *__pyx_r = 0;
17546  __Pyx_RefNannyDeclarations
17547  __Pyx_RefNannySetupContext("allocateGeometricInfo_quadrilateral (wrapper)", 0);
17548  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 482, __pyx_L1_error)
17549  __pyx_r = __pyx_pf_10cmeshTools_60allocateGeometricInfo_quadrilateral(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17550 
17551  /* function exit code */
17552  goto __pyx_L0;
17553  __pyx_L1_error:;
17554  __pyx_r = NULL;
17555  __pyx_L0:;
17556  __Pyx_RefNannyFinishContext();
17557  return __pyx_r;
17558 }
17559 
17560 static PyObject *__pyx_pf_10cmeshTools_60allocateGeometricInfo_quadrilateral(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17561  PyObject *__pyx_r = NULL;
17562  __Pyx_RefNannyDeclarations
17563  PyObject *__pyx_t_1 = NULL;
17564  __Pyx_RefNannySetupContext("allocateGeometricInfo_quadrilateral", 0);
17565  __Pyx_XDECREF(__pyx_r);
17566  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_quadrilateral(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 482, __pyx_L1_error)
17567  __Pyx_GOTREF(__pyx_t_1);
17568  __pyx_r = __pyx_t_1;
17569  __pyx_t_1 = 0;
17570  goto __pyx_L0;
17571 
17572  /* function exit code */
17573  __pyx_L1_error:;
17574  __Pyx_XDECREF(__pyx_t_1);
17575  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_quadrilateral", __pyx_clineno, __pyx_lineno, __pyx_filename);
17576  __pyx_r = NULL;
17577  __pyx_L0:;
17578  __Pyx_XGIVEREF(__pyx_r);
17579  __Pyx_RefNannyFinishContext();
17580  return __pyx_r;
17581 }
17582 
17583 /* "cmeshTools.pyx":485
17584  * cppm.allocateGeometricInfo_quadrilateral(cmesh.mesh);
17585  *
17586  * cpdef void computeGeometricInfo_NURBS(CMesh cmesh): # <<<<<<<<<<<<<<
17587  * cppm.computeGeometricInfo_NURBS(cmesh.mesh);
17588  *
17589  */
17590 
17591 static PyObject *__pyx_pw_10cmeshTools_63computeGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17592 static void __pyx_f_10cmeshTools_computeGeometricInfo_NURBS(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17593  __Pyx_RefNannyDeclarations
17594  __Pyx_RefNannySetupContext("computeGeometricInfo_NURBS", 0);
17595 
17596  /* "cmeshTools.pyx":486
17597  *
17598  * cpdef void computeGeometricInfo_NURBS(CMesh cmesh):
17599  * cppm.computeGeometricInfo_NURBS(cmesh.mesh); # <<<<<<<<<<<<<<
17600  *
17601  * cpdef void allocateGeometricInfo_NURBS(CMesh cmesh):
17602  */
17603  (void)(computeGeometricInfo_NURBS(__pyx_v_cmesh->mesh));
17604 
17605  /* "cmeshTools.pyx":485
17606  * cppm.allocateGeometricInfo_quadrilateral(cmesh.mesh);
17607  *
17608  * cpdef void computeGeometricInfo_NURBS(CMesh cmesh): # <<<<<<<<<<<<<<
17609  * cppm.computeGeometricInfo_NURBS(cmesh.mesh);
17610  *
17611  */
17612 
17613  /* function exit code */
17614  __Pyx_RefNannyFinishContext();
17615 }
17616 
17617 /* Python wrapper */
17618 static PyObject *__pyx_pw_10cmeshTools_63computeGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17619 static PyObject *__pyx_pw_10cmeshTools_63computeGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17620  PyObject *__pyx_r = 0;
17621  __Pyx_RefNannyDeclarations
17622  __Pyx_RefNannySetupContext("computeGeometricInfo_NURBS (wrapper)", 0);
17623  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 485, __pyx_L1_error)
17624  __pyx_r = __pyx_pf_10cmeshTools_62computeGeometricInfo_NURBS(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17625 
17626  /* function exit code */
17627  goto __pyx_L0;
17628  __pyx_L1_error:;
17629  __pyx_r = NULL;
17630  __pyx_L0:;
17631  __Pyx_RefNannyFinishContext();
17632  return __pyx_r;
17633 }
17634 
17635 static PyObject *__pyx_pf_10cmeshTools_62computeGeometricInfo_NURBS(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17636  PyObject *__pyx_r = NULL;
17637  __Pyx_RefNannyDeclarations
17638  PyObject *__pyx_t_1 = NULL;
17639  __Pyx_RefNannySetupContext("computeGeometricInfo_NURBS", 0);
17640  __Pyx_XDECREF(__pyx_r);
17641  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_computeGeometricInfo_NURBS(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 485, __pyx_L1_error)
17642  __Pyx_GOTREF(__pyx_t_1);
17643  __pyx_r = __pyx_t_1;
17644  __pyx_t_1 = 0;
17645  goto __pyx_L0;
17646 
17647  /* function exit code */
17648  __pyx_L1_error:;
17649  __Pyx_XDECREF(__pyx_t_1);
17650  __Pyx_AddTraceback("cmeshTools.computeGeometricInfo_NURBS", __pyx_clineno, __pyx_lineno, __pyx_filename);
17651  __pyx_r = NULL;
17652  __pyx_L0:;
17653  __Pyx_XGIVEREF(__pyx_r);
17654  __Pyx_RefNannyFinishContext();
17655  return __pyx_r;
17656 }
17657 
17658 /* "cmeshTools.pyx":488
17659  * cppm.computeGeometricInfo_NURBS(cmesh.mesh);
17660  *
17661  * cpdef void allocateGeometricInfo_NURBS(CMesh cmesh): # <<<<<<<<<<<<<<
17662  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
17663  *
17664  */
17665 
17666 static PyObject *__pyx_pw_10cmeshTools_65allocateGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17667 static void __pyx_f_10cmeshTools_allocateGeometricInfo_NURBS(struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh, CYTHON_UNUSED int __pyx_skip_dispatch) {
17668  __Pyx_RefNannyDeclarations
17669  __Pyx_RefNannySetupContext("allocateGeometricInfo_NURBS", 0);
17670 
17671  /* "cmeshTools.pyx":489
17672  *
17673  * cpdef void allocateGeometricInfo_NURBS(CMesh cmesh):
17674  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh); # <<<<<<<<<<<<<<
17675  *
17676  * def locallyRefineMultilevelMesh(int nSpace,
17677  */
17678  (void)(allocateGeometricInfo_NURBS(__pyx_v_cmesh->mesh));
17679 
17680  /* "cmeshTools.pyx":488
17681  * cppm.computeGeometricInfo_NURBS(cmesh.mesh);
17682  *
17683  * cpdef void allocateGeometricInfo_NURBS(CMesh cmesh): # <<<<<<<<<<<<<<
17684  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
17685  *
17686  */
17687 
17688  /* function exit code */
17689  __Pyx_RefNannyFinishContext();
17690 }
17691 
17692 /* Python wrapper */
17693 static PyObject *__pyx_pw_10cmeshTools_65allocateGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh); /*proto*/
17694 static PyObject *__pyx_pw_10cmeshTools_65allocateGeometricInfo_NURBS(PyObject *__pyx_self, PyObject *__pyx_v_cmesh) {
17695  PyObject *__pyx_r = 0;
17696  __Pyx_RefNannyDeclarations
17697  __Pyx_RefNannySetupContext("allocateGeometricInfo_NURBS (wrapper)", 0);
17698  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmesh), __pyx_ptype_10cmeshTools_CMesh, 1, "cmesh", 0))) __PYX_ERR(1, 488, __pyx_L1_error)
17699  __pyx_r = __pyx_pf_10cmeshTools_64allocateGeometricInfo_NURBS(__pyx_self, ((struct __pyx_obj_10cmeshTools_CMesh *)__pyx_v_cmesh));
17700 
17701  /* function exit code */
17702  goto __pyx_L0;
17703  __pyx_L1_error:;
17704  __pyx_r = NULL;
17705  __pyx_L0:;
17706  __Pyx_RefNannyFinishContext();
17707  return __pyx_r;
17708 }
17709 
17710 static PyObject *__pyx_pf_10cmeshTools_64allocateGeometricInfo_NURBS(CYTHON_UNUSED PyObject *__pyx_self, struct __pyx_obj_10cmeshTools_CMesh *__pyx_v_cmesh) {
17711  PyObject *__pyx_r = NULL;
17712  __Pyx_RefNannyDeclarations
17713  PyObject *__pyx_t_1 = NULL;
17714  __Pyx_RefNannySetupContext("allocateGeometricInfo_NURBS", 0);
17715  __Pyx_XDECREF(__pyx_r);
17716  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_10cmeshTools_allocateGeometricInfo_NURBS(__pyx_v_cmesh, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 488, __pyx_L1_error)
17717  __Pyx_GOTREF(__pyx_t_1);
17718  __pyx_r = __pyx_t_1;
17719  __pyx_t_1 = 0;
17720  goto __pyx_L0;
17721 
17722  /* function exit code */
17723  __pyx_L1_error:;
17724  __Pyx_XDECREF(__pyx_t_1);
17725  __Pyx_AddTraceback("cmeshTools.allocateGeometricInfo_NURBS", __pyx_clineno, __pyx_lineno, __pyx_filename);
17726  __pyx_r = NULL;
17727  __pyx_L0:;
17728  __Pyx_XGIVEREF(__pyx_r);
17729  __Pyx_RefNannyFinishContext();
17730  return __pyx_r;
17731 }
17732 
17733 /* "cmeshTools.pyx":491
17734  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
17735  *
17736  * def locallyRefineMultilevelMesh(int nSpace, # <<<<<<<<<<<<<<
17737  * CMultilevelMesh cmultilevelMesh,
17738  * np.ndarray elementTagArray,
17739  */
17740 
17741 /* Python wrapper */
17742 static PyObject *__pyx_pw_10cmeshTools_67locallyRefineMultilevelMesh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
17743 static PyMethodDef __pyx_mdef_10cmeshTools_67locallyRefineMultilevelMesh = {"locallyRefineMultilevelMesh", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_67locallyRefineMultilevelMesh, METH_VARARGS|METH_KEYWORDS, 0};
17744 static PyObject *__pyx_pw_10cmeshTools_67locallyRefineMultilevelMesh(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
17745  int __pyx_v_nSpace;
17746  struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh = 0;
17747  PyArrayObject *__pyx_v_elementTagArray = 0;
17748  int __pyx_v_refineTypeFlag;
17749  PyObject *__pyx_r = 0;
17750  __Pyx_RefNannyDeclarations
17751  __Pyx_RefNannySetupContext("locallyRefineMultilevelMesh (wrapper)", 0);
17752  {
17753  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nSpace,&__pyx_n_s_cmultilevelMesh,&__pyx_n_s_elementTagArray,&__pyx_n_s_refineTypeFlag,0};
17754  PyObject* values[4] = {0,0,0,0};
17755  if (unlikely(__pyx_kwds)) {
17756  Py_ssize_t kw_args;
17757  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
17758  switch (pos_args) {
17759  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
17760  CYTHON_FALLTHROUGH;
17761  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17762  CYTHON_FALLTHROUGH;
17763  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17764  CYTHON_FALLTHROUGH;
17765  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17766  CYTHON_FALLTHROUGH;
17767  case 0: break;
17768  default: goto __pyx_L5_argtuple_error;
17769  }
17770  kw_args = PyDict_Size(__pyx_kwds);
17771  switch (pos_args) {
17772  case 0:
17773  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
17774  else goto __pyx_L5_argtuple_error;
17775  CYTHON_FALLTHROUGH;
17776  case 1:
17777  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmultilevelMesh)) != 0)) kw_args--;
17778  else {
17779  __Pyx_RaiseArgtupleInvalid("locallyRefineMultilevelMesh", 0, 3, 4, 1); __PYX_ERR(1, 491, __pyx_L3_error)
17780  }
17781  CYTHON_FALLTHROUGH;
17782  case 2:
17783  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_elementTagArray)) != 0)) kw_args--;
17784  else {
17785  __Pyx_RaiseArgtupleInvalid("locallyRefineMultilevelMesh", 0, 3, 4, 2); __PYX_ERR(1, 491, __pyx_L3_error)
17786  }
17787  CYTHON_FALLTHROUGH;
17788  case 3:
17789  if (kw_args > 0) {
17790  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_refineTypeFlag);
17791  if (value) { values[3] = value; kw_args--; }
17792  }
17793  }
17794  if (unlikely(kw_args > 0)) {
17795  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "locallyRefineMultilevelMesh") < 0)) __PYX_ERR(1, 491, __pyx_L3_error)
17796  }
17797  } else {
17798  switch (PyTuple_GET_SIZE(__pyx_args)) {
17799  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
17800  CYTHON_FALLTHROUGH;
17801  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
17802  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
17803  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
17804  break;
17805  default: goto __pyx_L5_argtuple_error;
17806  }
17807  }
17808  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 491, __pyx_L3_error)
17809  __pyx_v_cmultilevelMesh = ((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)values[1]);
17810  __pyx_v_elementTagArray = ((PyArrayObject *)values[2]);
17811  if (values[3]) {
17812  __pyx_v_refineTypeFlag = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_refineTypeFlag == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 494, __pyx_L3_error)
17813  } else {
17814  __pyx_v_refineTypeFlag = ((int)0);
17815  }
17816  }
17817  goto __pyx_L4_argument_unpacking_done;
17818  __pyx_L5_argtuple_error:;
17819  __Pyx_RaiseArgtupleInvalid("locallyRefineMultilevelMesh", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 491, __pyx_L3_error)
17820  __pyx_L3_error:;
17821  __Pyx_AddTraceback("cmeshTools.locallyRefineMultilevelMesh", __pyx_clineno, __pyx_lineno, __pyx_filename);
17822  __Pyx_RefNannyFinishContext();
17823  return NULL;
17824  __pyx_L4_argument_unpacking_done:;
17825  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmultilevelMesh), __pyx_ptype_10cmeshTools_CMultilevelMesh, 1, "cmultilevelMesh", 0))) __PYX_ERR(1, 492, __pyx_L1_error)
17826  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elementTagArray), __pyx_ptype_5numpy_ndarray, 1, "elementTagArray", 0))) __PYX_ERR(1, 493, __pyx_L1_error)
17827  __pyx_r = __pyx_pf_10cmeshTools_66locallyRefineMultilevelMesh(__pyx_self, __pyx_v_nSpace, __pyx_v_cmultilevelMesh, __pyx_v_elementTagArray, __pyx_v_refineTypeFlag);
17828 
17829  /* function exit code */
17830  goto __pyx_L0;
17831  __pyx_L1_error:;
17832  __pyx_r = NULL;
17833  __pyx_L0:;
17834  __Pyx_RefNannyFinishContext();
17835  return __pyx_r;
17836 }
17837 
17838 static PyObject *__pyx_pf_10cmeshTools_66locallyRefineMultilevelMesh(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nSpace, struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh, PyArrayObject *__pyx_v_elementTagArray, int __pyx_v_refineTypeFlag) {
17839  CYTHON_UNUSED int __pyx_v_failed;
17840  int __pyx_v_finestLevel;
17841  PyObject *__pyx_r = NULL;
17842  __Pyx_RefNannyDeclarations
17843  int __pyx_t_1;
17844  int __pyx_t_2;
17845  PyObject *__pyx_t_3 = NULL;
17846  PyObject *__pyx_t_4 = NULL;
17847  PyObject *__pyx_t_5 = NULL;
17848  PyObject *__pyx_t_6 = NULL;
17849  __Pyx_RefNannySetupContext("locallyRefineMultilevelMesh", 0);
17850 
17851  /* "cmeshTools.pyx":496
17852  * int refineTypeFlag=0):
17853  * cdef int failed,finestLevel
17854  * if nSpace == 1: # <<<<<<<<<<<<<<
17855  * failed = cppm.locallyRefineEdgeMesh(cmultilevelMesh.multilevelMesh,
17856  * <int*>(elementTagArray.data))
17857  */
17858  switch (__pyx_v_nSpace) {
17859  case 1:
17860 
17861  /* "cmeshTools.pyx":497
17862  * cdef int failed,finestLevel
17863  * if nSpace == 1:
17864  * failed = cppm.locallyRefineEdgeMesh(cmultilevelMesh.multilevelMesh, # <<<<<<<<<<<<<<
17865  * <int*>(elementTagArray.data))
17866  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
17867  */
17868  __pyx_v_failed = locallyRefineEdgeMesh(__pyx_v_cmultilevelMesh->multilevelMesh, ((int *)__pyx_v_elementTagArray->data));
17869 
17870  /* "cmeshTools.pyx":499
17871  * failed = cppm.locallyRefineEdgeMesh(cmultilevelMesh.multilevelMesh,
17872  * <int*>(elementTagArray.data))
17873  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels # <<<<<<<<<<<<<<
17874  * cppm.constructElementBoundaryElementsArray_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17875  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17876  */
17877  __pyx_t_1 = __pyx_v_cmultilevelMesh->multilevelMesh.nLevels;
17878  __pyx_v_finestLevel = __pyx_t_1;
17879 
17880  /* "cmeshTools.pyx":500
17881  * <int*>(elementTagArray.data))
17882  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
17883  * cppm.constructElementBoundaryElementsArray_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
17884  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17885  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17886  */
17887  (void)(constructElementBoundaryElementsArray_edge((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
17888 
17889  /* "cmeshTools.pyx":501
17890  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
17891  * cppm.constructElementBoundaryElementsArray_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17892  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
17893  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17894  * if finestLevel > 1:
17895  */
17896  (void)(allocateGeometricInfo_edge((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
17897 
17898  /* "cmeshTools.pyx":502
17899  * cppm.constructElementBoundaryElementsArray_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17900  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17901  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
17902  * if finestLevel > 1:
17903  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
17904  */
17905  (void)(computeGeometricInfo_edge((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
17906 
17907  /* "cmeshTools.pyx":503
17908  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17909  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17910  * if finestLevel > 1: # <<<<<<<<<<<<<<
17911  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
17912  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
17913  */
17914  __pyx_t_2 = ((__pyx_v_finestLevel > 1) != 0);
17915  if (__pyx_t_2) {
17916 
17917  /* "cmeshTools.pyx":504
17918  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17919  * if finestLevel > 1:
17920  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2], # <<<<<<<<<<<<<<
17921  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
17922  * cmultilevelMesh.multilevelMesh.elementParentsArray[finestLevel-1],
17923  */
17924  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 2)]), (__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)]), (__pyx_v_cmultilevelMesh->multilevelMesh.elementParentsArray[(__pyx_v_finestLevel - 1)]), 1));
17925 
17926  /* "cmeshTools.pyx":503
17927  * cppm.allocateGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17928  * cppm.computeGeometricInfo_edge(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
17929  * if finestLevel > 1: # <<<<<<<<<<<<<<
17930  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
17931  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
17932  */
17933  }
17934 
17935  /* "cmeshTools.pyx":496
17936  * int refineTypeFlag=0):
17937  * cdef int failed,finestLevel
17938  * if nSpace == 1: # <<<<<<<<<<<<<<
17939  * failed = cppm.locallyRefineEdgeMesh(cmultilevelMesh.multilevelMesh,
17940  * <int*>(elementTagArray.data))
17941  */
17942  break;
17943  case 2:
17944 
17945  /* "cmeshTools.pyx":509
17946  * 1)
17947  * elif nSpace == 2:
17948  * if refineTypeFlag==1: # <<<<<<<<<<<<<<
17949  * failed = cppm.locallyRefineTriangleMesh_4T(cmultilevelMesh.multilevelMesh,
17950  * <int*>(elementTagArray.data))
17951  */
17952  switch (__pyx_v_refineTypeFlag) {
17953  case 1:
17954 
17955  /* "cmeshTools.pyx":510
17956  * elif nSpace == 2:
17957  * if refineTypeFlag==1:
17958  * failed = cppm.locallyRefineTriangleMesh_4T(cmultilevelMesh.multilevelMesh, # <<<<<<<<<<<<<<
17959  * <int*>(elementTagArray.data))
17960  * elif refineTypeFlag==2:
17961  */
17962  __pyx_v_failed = locallyRefineTriangleMesh_4T(__pyx_v_cmultilevelMesh->multilevelMesh, ((int *)__pyx_v_elementTagArray->data));
17963 
17964  /* "cmeshTools.pyx":509
17965  * 1)
17966  * elif nSpace == 2:
17967  * if refineTypeFlag==1: # <<<<<<<<<<<<<<
17968  * failed = cppm.locallyRefineTriangleMesh_4T(cmultilevelMesh.multilevelMesh,
17969  * <int*>(elementTagArray.data))
17970  */
17971  break;
17972  case 2:
17973 
17974  /* "cmeshTools.pyx":513
17975  * <int*>(elementTagArray.data))
17976  * elif refineTypeFlag==2:
17977  * failed = cppm.locallyRefineTriangleMesh_redGreen(cmultilevelMesh.multilevelMesh,<int*>(elementTagArray.data)) # <<<<<<<<<<<<<<
17978  * else:
17979  * failed = cppm.locallyRefineTriangleMesh(cmultilevelMesh.multilevelMesh,
17980  */
17981  __pyx_v_failed = locallyRefineTriangleMesh_redGreen(__pyx_v_cmultilevelMesh->multilevelMesh, ((int *)__pyx_v_elementTagArray->data));
17982 
17983  /* "cmeshTools.pyx":512
17984  * failed = cppm.locallyRefineTriangleMesh_4T(cmultilevelMesh.multilevelMesh,
17985  * <int*>(elementTagArray.data))
17986  * elif refineTypeFlag==2: # <<<<<<<<<<<<<<
17987  * failed = cppm.locallyRefineTriangleMesh_redGreen(cmultilevelMesh.multilevelMesh,<int*>(elementTagArray.data))
17988  * else:
17989  */
17990  break;
17991  default:
17992 
17993  /* "cmeshTools.pyx":515
17994  * failed = cppm.locallyRefineTriangleMesh_redGreen(cmultilevelMesh.multilevelMesh,<int*>(elementTagArray.data))
17995  * else:
17996  * failed = cppm.locallyRefineTriangleMesh(cmultilevelMesh.multilevelMesh, # <<<<<<<<<<<<<<
17997  * <int*>(elementTagArray.data))
17998  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
17999  */
18000  __pyx_v_failed = locallyRefineTriangleMesh(__pyx_v_cmultilevelMesh->multilevelMesh, ((int *)__pyx_v_elementTagArray->data));
18001  break;
18002  }
18003 
18004  /* "cmeshTools.pyx":517
18005  * failed = cppm.locallyRefineTriangleMesh(cmultilevelMesh.multilevelMesh,
18006  * <int*>(elementTagArray.data))
18007  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels # <<<<<<<<<<<<<<
18008  * cppm.constructElementBoundaryElementsArray_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18009  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18010  */
18011  __pyx_t_1 = __pyx_v_cmultilevelMesh->multilevelMesh.nLevels;
18012  __pyx_v_finestLevel = __pyx_t_1;
18013 
18014  /* "cmeshTools.pyx":518
18015  * <int*>(elementTagArray.data))
18016  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
18017  * cppm.constructElementBoundaryElementsArray_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
18018  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18019  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18020  */
18021  (void)(constructElementBoundaryElementsArray_triangle((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
18022 
18023  /* "cmeshTools.pyx":519
18024  * finestLevel = cmultilevelMesh.multilevelMesh.nLevels
18025  * cppm.constructElementBoundaryElementsArray_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18026  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
18027  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18028  * if finestLevel > 1:
18029  */
18030  (void)(allocateGeometricInfo_triangle((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
18031 
18032  /* "cmeshTools.pyx":520
18033  * cppm.constructElementBoundaryElementsArray_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18034  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18035  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1]) # <<<<<<<<<<<<<<
18036  * if finestLevel > 1:
18037  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
18038  */
18039  (void)(computeGeometricInfo_triangle((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)])));
18040 
18041  /* "cmeshTools.pyx":521
18042  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18043  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18044  * if finestLevel > 1: # <<<<<<<<<<<<<<
18045  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
18046  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
18047  */
18048  __pyx_t_2 = ((__pyx_v_finestLevel > 1) != 0);
18049  if (__pyx_t_2) {
18050 
18051  /* "cmeshTools.pyx":522
18052  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18053  * if finestLevel > 1:
18054  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2], # <<<<<<<<<<<<<<
18055  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
18056  * cmultilevelMesh.multilevelMesh.elementParentsArray[finestLevel-1],
18057  */
18058  (void)(assignElementBoundaryMaterialTypesFromParent((__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 2)]), (__pyx_v_cmultilevelMesh->multilevelMesh.meshArray[(__pyx_v_finestLevel - 1)]), (__pyx_v_cmultilevelMesh->multilevelMesh.elementParentsArray[(__pyx_v_finestLevel - 1)]), 2));
18059 
18060  /* "cmeshTools.pyx":521
18061  * cppm.allocateGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18062  * cppm.computeGeometricInfo_triangle(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1])
18063  * if finestLevel > 1: # <<<<<<<<<<<<<<
18064  * cppm.assignElementBoundaryMaterialTypesFromParent(cmultilevelMesh.multilevelMesh.meshArray[finestLevel-2],
18065  * cmultilevelMesh.multilevelMesh.meshArray[finestLevel-1],
18066  */
18067  }
18068 
18069  /* "cmeshTools.pyx":508
18070  * cmultilevelMesh.multilevelMesh.elementParentsArray[finestLevel-1],
18071  * 1)
18072  * elif nSpace == 2: # <<<<<<<<<<<<<<
18073  * if refineTypeFlag==1:
18074  * failed = cppm.locallyRefineTriangleMesh_4T(cmultilevelMesh.multilevelMesh,
18075  */
18076  break;
18077  default:
18078 
18079  /* "cmeshTools.pyx":527
18080  * 2)
18081  * else:
18082  * print("locallyRefine nSpace= {0:d} not implemented! Returning.".format(nSpace)) # <<<<<<<<<<<<<<
18083  *
18084  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh):
18085  */
18086  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_locallyRefine_nSpace_0_d_not_imp, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 527, __pyx_L1_error)
18087  __Pyx_GOTREF(__pyx_t_4);
18088  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_nSpace); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 527, __pyx_L1_error)
18089  __Pyx_GOTREF(__pyx_t_5);
18090  __pyx_t_6 = NULL;
18091  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
18092  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
18093  if (likely(__pyx_t_6)) {
18094  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
18095  __Pyx_INCREF(__pyx_t_6);
18096  __Pyx_INCREF(function);
18097  __Pyx_DECREF_SET(__pyx_t_4, function);
18098  }
18099  }
18100  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5);
18101  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
18102  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
18103  if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 527, __pyx_L1_error)
18104  __Pyx_GOTREF(__pyx_t_3);
18105  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18106  if (__Pyx_PrintOne(0, __pyx_t_3) < 0) __PYX_ERR(1, 527, __pyx_L1_error)
18107  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18108  break;
18109  }
18110 
18111  /* "cmeshTools.pyx":491
18112  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
18113  *
18114  * def locallyRefineMultilevelMesh(int nSpace, # <<<<<<<<<<<<<<
18115  * CMultilevelMesh cmultilevelMesh,
18116  * np.ndarray elementTagArray,
18117  */
18118 
18119  /* function exit code */
18120  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18121  goto __pyx_L0;
18122  __pyx_L1_error:;
18123  __Pyx_XDECREF(__pyx_t_3);
18124  __Pyx_XDECREF(__pyx_t_4);
18125  __Pyx_XDECREF(__pyx_t_5);
18126  __Pyx_XDECREF(__pyx_t_6);
18127  __Pyx_AddTraceback("cmeshTools.locallyRefineMultilevelMesh", __pyx_clineno, __pyx_lineno, __pyx_filename);
18128  __pyx_r = NULL;
18129  __pyx_L0:;
18130  __Pyx_XGIVEREF(__pyx_r);
18131  __Pyx_RefNannyFinishContext();
18132  return __pyx_r;
18133 }
18134 
18135 /* "cmeshTools.pyx":529
18136  * print("locallyRefine nSpace= {0:d} not implemented! Returning.".format(nSpace))
18137  *
18138  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh): # <<<<<<<<<<<<<<
18139  * if nSpace == 2:
18140  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
18141  */
18142 
18143 /* Python wrapper */
18144 static PyObject *__pyx_pw_10cmeshTools_69setNewestNodeBases(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
18145 static PyMethodDef __pyx_mdef_10cmeshTools_69setNewestNodeBases = {"setNewestNodeBases", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_69setNewestNodeBases, METH_VARARGS|METH_KEYWORDS, 0};
18146 static PyObject *__pyx_pw_10cmeshTools_69setNewestNodeBases(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
18147  int __pyx_v_nSpace;
18148  struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh = 0;
18149  PyObject *__pyx_r = 0;
18150  __Pyx_RefNannyDeclarations
18151  __Pyx_RefNannySetupContext("setNewestNodeBases (wrapper)", 0);
18152  {
18153  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_nSpace,&__pyx_n_s_cmultilevelMesh,0};
18154  PyObject* values[2] = {0,0};
18155  if (unlikely(__pyx_kwds)) {
18156  Py_ssize_t kw_args;
18157  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
18158  switch (pos_args) {
18159  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18160  CYTHON_FALLTHROUGH;
18161  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18162  CYTHON_FALLTHROUGH;
18163  case 0: break;
18164  default: goto __pyx_L5_argtuple_error;
18165  }
18166  kw_args = PyDict_Size(__pyx_kwds);
18167  switch (pos_args) {
18168  case 0:
18169  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_nSpace)) != 0)) kw_args--;
18170  else goto __pyx_L5_argtuple_error;
18171  CYTHON_FALLTHROUGH;
18172  case 1:
18173  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cmultilevelMesh)) != 0)) kw_args--;
18174  else {
18175  __Pyx_RaiseArgtupleInvalid("setNewestNodeBases", 1, 2, 2, 1); __PYX_ERR(1, 529, __pyx_L3_error)
18176  }
18177  }
18178  if (unlikely(kw_args > 0)) {
18179  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "setNewestNodeBases") < 0)) __PYX_ERR(1, 529, __pyx_L3_error)
18180  }
18181  } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
18182  goto __pyx_L5_argtuple_error;
18183  } else {
18184  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
18185  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
18186  }
18187  __pyx_v_nSpace = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_nSpace == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 529, __pyx_L3_error)
18188  __pyx_v_cmultilevelMesh = ((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)values[1]);
18189  }
18190  goto __pyx_L4_argument_unpacking_done;
18191  __pyx_L5_argtuple_error:;
18192  __Pyx_RaiseArgtupleInvalid("setNewestNodeBases", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 529, __pyx_L3_error)
18193  __pyx_L3_error:;
18194  __Pyx_AddTraceback("cmeshTools.setNewestNodeBases", __pyx_clineno, __pyx_lineno, __pyx_filename);
18195  __Pyx_RefNannyFinishContext();
18196  return NULL;
18197  __pyx_L4_argument_unpacking_done:;
18198  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cmultilevelMesh), __pyx_ptype_10cmeshTools_CMultilevelMesh, 1, "cmultilevelMesh", 0))) __PYX_ERR(1, 529, __pyx_L1_error)
18199  __pyx_r = __pyx_pf_10cmeshTools_68setNewestNodeBases(__pyx_self, __pyx_v_nSpace, __pyx_v_cmultilevelMesh);
18200 
18201  /* function exit code */
18202  goto __pyx_L0;
18203  __pyx_L1_error:;
18204  __pyx_r = NULL;
18205  __pyx_L0:;
18206  __Pyx_RefNannyFinishContext();
18207  return __pyx_r;
18208 }
18209 
18210 static PyObject *__pyx_pf_10cmeshTools_68setNewestNodeBases(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_nSpace, struct __pyx_obj_10cmeshTools_CMultilevelMesh *__pyx_v_cmultilevelMesh) {
18211  CYTHON_UNUSED int __pyx_v_failed;
18212  PyObject *__pyx_r = NULL;
18213  __Pyx_RefNannyDeclarations
18214  int __pyx_t_1;
18215  PyObject *__pyx_t_2 = NULL;
18216  PyObject *__pyx_t_3 = NULL;
18217  PyObject *__pyx_t_4 = NULL;
18218  PyObject *__pyx_t_5 = NULL;
18219  __Pyx_RefNannySetupContext("setNewestNodeBases", 0);
18220 
18221  /* "cmeshTools.pyx":530
18222  *
18223  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh):
18224  * if nSpace == 2: # <<<<<<<<<<<<<<
18225  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
18226  * else:
18227  */
18228  __pyx_t_1 = ((__pyx_v_nSpace == 2) != 0);
18229  if (__pyx_t_1) {
18230 
18231  /* "cmeshTools.pyx":531
18232  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh):
18233  * if nSpace == 2:
18234  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh) # <<<<<<<<<<<<<<
18235  * else:
18236  * print("setNewestNodeBases= {0:d} not implemented! Returning".format(nSpace))
18237  */
18238  __pyx_v_failed = setNewestNodeBasesToLongestEdge(__pyx_v_cmultilevelMesh->multilevelMesh);
18239 
18240  /* "cmeshTools.pyx":530
18241  *
18242  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh):
18243  * if nSpace == 2: # <<<<<<<<<<<<<<
18244  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
18245  * else:
18246  */
18247  goto __pyx_L3;
18248  }
18249 
18250  /* "cmeshTools.pyx":533
18251  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
18252  * else:
18253  * print("setNewestNodeBases= {0:d} not implemented! Returning".format(nSpace)) # <<<<<<<<<<<<<<
18254  */
18255  /*else*/ {
18256  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_setNewestNodeBases_0_d_not_imple, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 533, __pyx_L1_error)
18257  __Pyx_GOTREF(__pyx_t_3);
18258  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_nSpace); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 533, __pyx_L1_error)
18259  __Pyx_GOTREF(__pyx_t_4);
18260  __pyx_t_5 = NULL;
18261  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
18262  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
18263  if (likely(__pyx_t_5)) {
18264  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
18265  __Pyx_INCREF(__pyx_t_5);
18266  __Pyx_INCREF(function);
18267  __Pyx_DECREF_SET(__pyx_t_3, function);
18268  }
18269  }
18270  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
18271  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
18272  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
18273  if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 533, __pyx_L1_error)
18274  __Pyx_GOTREF(__pyx_t_2);
18275  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18276  if (__Pyx_PrintOne(0, __pyx_t_2) < 0) __PYX_ERR(1, 533, __pyx_L1_error)
18277  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
18278  }
18279  __pyx_L3:;
18280 
18281  /* "cmeshTools.pyx":529
18282  * print("locallyRefine nSpace= {0:d} not implemented! Returning.".format(nSpace))
18283  *
18284  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh): # <<<<<<<<<<<<<<
18285  * if nSpace == 2:
18286  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
18287  */
18288 
18289  /* function exit code */
18290  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
18291  goto __pyx_L0;
18292  __pyx_L1_error:;
18293  __Pyx_XDECREF(__pyx_t_2);
18294  __Pyx_XDECREF(__pyx_t_3);
18295  __Pyx_XDECREF(__pyx_t_4);
18296  __Pyx_XDECREF(__pyx_t_5);
18297  __Pyx_AddTraceback("cmeshTools.setNewestNodeBases", __pyx_clineno, __pyx_lineno, __pyx_filename);
18298  __pyx_r = NULL;
18299  __pyx_L0:;
18300  __Pyx_XGIVEREF(__pyx_r);
18301  __Pyx_RefNannyFinishContext();
18302  return __pyx_r;
18303 }
18304 
18305 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
18306  * # experimental exception made for __getbuffer__ and __releasebuffer__
18307  * # -- the details of this may change.
18308  * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
18309  * # This implementation of getbuffer is geared towards Cython
18310  * # requirements, and does not yet fulfill the PEP.
18311  */
18312 
18313 /* Python wrapper */
18314 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
18315 static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
18316  int __pyx_r;
18317  __Pyx_RefNannyDeclarations
18318  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
18319  __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
18320 
18321  /* function exit code */
18322  __Pyx_RefNannyFinishContext();
18323  return __pyx_r;
18324 }
18325 
18326 static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
18327  int __pyx_v_i;
18328  int __pyx_v_ndim;
18329  int __pyx_v_endian_detector;
18330  int __pyx_v_little_endian;
18331  int __pyx_v_t;
18332  char *__pyx_v_f;
18333  PyArray_Descr *__pyx_v_descr = 0;
18334  int __pyx_v_offset;
18335  int __pyx_r;
18336  __Pyx_RefNannyDeclarations
18337  int __pyx_t_1;
18338  int __pyx_t_2;
18339  PyObject *__pyx_t_3 = NULL;
18340  int __pyx_t_4;
18341  int __pyx_t_5;
18342  int __pyx_t_6;
18343  PyArray_Descr *__pyx_t_7;
18344  PyObject *__pyx_t_8 = NULL;
18345  char *__pyx_t_9;
18346  if (__pyx_v_info == NULL) {
18347  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
18348  return -1;
18349  }
18350  __Pyx_RefNannySetupContext("__getbuffer__", 0);
18351  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
18352  __Pyx_GIVEREF(__pyx_v_info->obj);
18353 
18354  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":265
18355  *
18356  * cdef int i, ndim
18357  * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
18358  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
18359  *
18360  */
18361  __pyx_v_endian_detector = 1;
18362 
18363  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":266
18364  * cdef int i, ndim
18365  * cdef int endian_detector = 1
18366  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
18367  *
18368  * ndim = PyArray_NDIM(self)
18369  */
18370  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
18371 
18372  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":268
18373  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
18374  *
18375  * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<<
18376  *
18377  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
18378  */
18379  __pyx_v_ndim = PyArray_NDIM(__pyx_v_self);
18380 
18381  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
18382  * ndim = PyArray_NDIM(self)
18383  *
18384  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
18385  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
18386  * raise ValueError(u"ndarray is not C contiguous")
18387  */
18388  __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0);
18389  if (__pyx_t_2) {
18390  } else {
18391  __pyx_t_1 = __pyx_t_2;
18392  goto __pyx_L4_bool_binop_done;
18393  }
18394 
18395  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":271
18396  *
18397  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
18398  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<<
18399  * raise ValueError(u"ndarray is not C contiguous")
18400  *
18401  */
18402  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0);
18403  __pyx_t_1 = __pyx_t_2;
18404  __pyx_L4_bool_binop_done:;
18405 
18406  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
18407  * ndim = PyArray_NDIM(self)
18408  *
18409  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
18410  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
18411  * raise ValueError(u"ndarray is not C contiguous")
18412  */
18413  if (unlikely(__pyx_t_1)) {
18414 
18415  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
18416  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
18417  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
18418  * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
18419  *
18420  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
18421  */
18422  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 272, __pyx_L1_error)
18423  __Pyx_GOTREF(__pyx_t_3);
18424  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
18425  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18426  __PYX_ERR(3, 272, __pyx_L1_error)
18427 
18428  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270
18429  * ndim = PyArray_NDIM(self)
18430  *
18431  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<<
18432  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
18433  * raise ValueError(u"ndarray is not C contiguous")
18434  */
18435  }
18436 
18437  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
18438  * raise ValueError(u"ndarray is not C contiguous")
18439  *
18440  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
18441  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
18442  * raise ValueError(u"ndarray is not Fortran contiguous")
18443  */
18444  __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0);
18445  if (__pyx_t_2) {
18446  } else {
18447  __pyx_t_1 = __pyx_t_2;
18448  goto __pyx_L7_bool_binop_done;
18449  }
18450 
18451  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":275
18452  *
18453  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
18454  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<<
18455  * raise ValueError(u"ndarray is not Fortran contiguous")
18456  *
18457  */
18458  __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0);
18459  __pyx_t_1 = __pyx_t_2;
18460  __pyx_L7_bool_binop_done:;
18461 
18462  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
18463  * raise ValueError(u"ndarray is not C contiguous")
18464  *
18465  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
18466  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
18467  * raise ValueError(u"ndarray is not Fortran contiguous")
18468  */
18469  if (unlikely(__pyx_t_1)) {
18470 
18471  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
18472  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
18473  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
18474  * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
18475  *
18476  * info.buf = PyArray_DATA(self)
18477  */
18478  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 276, __pyx_L1_error)
18479  __Pyx_GOTREF(__pyx_t_3);
18480  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
18481  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18482  __PYX_ERR(3, 276, __pyx_L1_error)
18483 
18484  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274
18485  * raise ValueError(u"ndarray is not C contiguous")
18486  *
18487  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<<
18488  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
18489  * raise ValueError(u"ndarray is not Fortran contiguous")
18490  */
18491  }
18492 
18493  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":278
18494  * raise ValueError(u"ndarray is not Fortran contiguous")
18495  *
18496  * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<<
18497  * info.ndim = ndim
18498  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
18499  */
18500  __pyx_v_info->buf = PyArray_DATA(__pyx_v_self);
18501 
18502  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":279
18503  *
18504  * info.buf = PyArray_DATA(self)
18505  * info.ndim = ndim # <<<<<<<<<<<<<<
18506  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
18507  * # Allocate new buffer for strides and shape info.
18508  */
18509  __pyx_v_info->ndim = __pyx_v_ndim;
18510 
18511  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
18512  * info.buf = PyArray_DATA(self)
18513  * info.ndim = ndim
18514  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
18515  * # Allocate new buffer for strides and shape info.
18516  * # This is allocated as one block, strides first.
18517  */
18518  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
18519  if (__pyx_t_1) {
18520 
18521  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":283
18522  * # Allocate new buffer for strides and shape info.
18523  * # This is allocated as one block, strides first.
18524  * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim) # <<<<<<<<<<<<<<
18525  * info.shape = info.strides + ndim
18526  * for i in range(ndim):
18527  */
18528  __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim))));
18529 
18530  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":284
18531  * # This is allocated as one block, strides first.
18532  * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
18533  * info.shape = info.strides + ndim # <<<<<<<<<<<<<<
18534  * for i in range(ndim):
18535  * info.strides[i] = PyArray_STRIDES(self)[i]
18536  */
18537  __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim);
18538 
18539  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":285
18540  * info.strides = <Py_ssize_t*>PyObject_Malloc(sizeof(Py_ssize_t) * 2 * <size_t>ndim)
18541  * info.shape = info.strides + ndim
18542  * for i in range(ndim): # <<<<<<<<<<<<<<
18543  * info.strides[i] = PyArray_STRIDES(self)[i]
18544  * info.shape[i] = PyArray_DIMS(self)[i]
18545  */
18546  __pyx_t_4 = __pyx_v_ndim;
18547  __pyx_t_5 = __pyx_t_4;
18548  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
18549  __pyx_v_i = __pyx_t_6;
18550 
18551  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":286
18552  * info.shape = info.strides + ndim
18553  * for i in range(ndim):
18554  * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<<
18555  * info.shape[i] = PyArray_DIMS(self)[i]
18556  * else:
18557  */
18558  (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]);
18559 
18560  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":287
18561  * for i in range(ndim):
18562  * info.strides[i] = PyArray_STRIDES(self)[i]
18563  * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<<
18564  * else:
18565  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
18566  */
18567  (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]);
18568  }
18569 
18570  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280
18571  * info.buf = PyArray_DATA(self)
18572  * info.ndim = ndim
18573  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
18574  * # Allocate new buffer for strides and shape info.
18575  * # This is allocated as one block, strides first.
18576  */
18577  goto __pyx_L9;
18578  }
18579 
18580  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":289
18581  * info.shape[i] = PyArray_DIMS(self)[i]
18582  * else:
18583  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self) # <<<<<<<<<<<<<<
18584  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
18585  * info.suboffsets = NULL
18586  */
18587  /*else*/ {
18588  __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self));
18589 
18590  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":290
18591  * else:
18592  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
18593  * info.shape = <Py_ssize_t*>PyArray_DIMS(self) # <<<<<<<<<<<<<<
18594  * info.suboffsets = NULL
18595  * info.itemsize = PyArray_ITEMSIZE(self)
18596  */
18597  __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self));
18598  }
18599  __pyx_L9:;
18600 
18601  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":291
18602  * info.strides = <Py_ssize_t*>PyArray_STRIDES(self)
18603  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
18604  * info.suboffsets = NULL # <<<<<<<<<<<<<<
18605  * info.itemsize = PyArray_ITEMSIZE(self)
18606  * info.readonly = not PyArray_ISWRITEABLE(self)
18607  */
18608  __pyx_v_info->suboffsets = NULL;
18609 
18610  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":292
18611  * info.shape = <Py_ssize_t*>PyArray_DIMS(self)
18612  * info.suboffsets = NULL
18613  * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<<
18614  * info.readonly = not PyArray_ISWRITEABLE(self)
18615  *
18616  */
18617  __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self);
18618 
18619  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":293
18620  * info.suboffsets = NULL
18621  * info.itemsize = PyArray_ITEMSIZE(self)
18622  * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<<
18623  *
18624  * cdef int t
18625  */
18626  __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0));
18627 
18628  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":296
18629  *
18630  * cdef int t
18631  * cdef char* f = NULL # <<<<<<<<<<<<<<
18632  * cdef dtype descr = <dtype>PyArray_DESCR(self)
18633  * cdef int offset
18634  */
18635  __pyx_v_f = NULL;
18636 
18637  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":297
18638  * cdef int t
18639  * cdef char* f = NULL
18640  * cdef dtype descr = <dtype>PyArray_DESCR(self) # <<<<<<<<<<<<<<
18641  * cdef int offset
18642  *
18643  */
18644  __pyx_t_7 = PyArray_DESCR(__pyx_v_self);
18645  __pyx_t_3 = ((PyObject *)__pyx_t_7);
18646  __Pyx_INCREF(__pyx_t_3);
18647  __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3);
18648  __pyx_t_3 = 0;
18649 
18650  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":300
18651  * cdef int offset
18652  *
18653  * info.obj = self # <<<<<<<<<<<<<<
18654  *
18655  * if not PyDataType_HASFIELDS(descr):
18656  */
18657  __Pyx_INCREF(((PyObject *)__pyx_v_self));
18658  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
18659  __Pyx_GOTREF(__pyx_v_info->obj);
18660  __Pyx_DECREF(__pyx_v_info->obj);
18661  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
18662 
18663  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302
18664  * info.obj = self
18665  *
18666  * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
18667  * t = descr.type_num
18668  * if ((descr.byteorder == c'>' and little_endian) or
18669  */
18670  __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0);
18671  if (__pyx_t_1) {
18672 
18673  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":303
18674  *
18675  * if not PyDataType_HASFIELDS(descr):
18676  * t = descr.type_num # <<<<<<<<<<<<<<
18677  * if ((descr.byteorder == c'>' and little_endian) or
18678  * (descr.byteorder == c'<' and not little_endian)):
18679  */
18680  __pyx_t_4 = __pyx_v_descr->type_num;
18681  __pyx_v_t = __pyx_t_4;
18682 
18683  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
18684  * if not PyDataType_HASFIELDS(descr):
18685  * t = descr.type_num
18686  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
18687  * (descr.byteorder == c'<' and not little_endian)):
18688  * raise ValueError(u"Non-native byte order not supported")
18689  */
18690  __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0);
18691  if (!__pyx_t_2) {
18692  goto __pyx_L15_next_or;
18693  } else {
18694  }
18695  __pyx_t_2 = (__pyx_v_little_endian != 0);
18696  if (!__pyx_t_2) {
18697  } else {
18698  __pyx_t_1 = __pyx_t_2;
18699  goto __pyx_L14_bool_binop_done;
18700  }
18701  __pyx_L15_next_or:;
18702 
18703  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":305
18704  * t = descr.type_num
18705  * if ((descr.byteorder == c'>' and little_endian) or
18706  * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
18707  * raise ValueError(u"Non-native byte order not supported")
18708  * if t == NPY_BYTE: f = "b"
18709  */
18710  __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0);
18711  if (__pyx_t_2) {
18712  } else {
18713  __pyx_t_1 = __pyx_t_2;
18714  goto __pyx_L14_bool_binop_done;
18715  }
18716  __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0);
18717  __pyx_t_1 = __pyx_t_2;
18718  __pyx_L14_bool_binop_done:;
18719 
18720  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
18721  * if not PyDataType_HASFIELDS(descr):
18722  * t = descr.type_num
18723  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
18724  * (descr.byteorder == c'<' and not little_endian)):
18725  * raise ValueError(u"Non-native byte order not supported")
18726  */
18727  if (unlikely(__pyx_t_1)) {
18728 
18729  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306
18730  * if ((descr.byteorder == c'>' and little_endian) or
18731  * (descr.byteorder == c'<' and not little_endian)):
18732  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
18733  * if t == NPY_BYTE: f = "b"
18734  * elif t == NPY_UBYTE: f = "B"
18735  */
18736  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 306, __pyx_L1_error)
18737  __Pyx_GOTREF(__pyx_t_3);
18738  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
18739  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18740  __PYX_ERR(3, 306, __pyx_L1_error)
18741 
18742  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304
18743  * if not PyDataType_HASFIELDS(descr):
18744  * t = descr.type_num
18745  * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
18746  * (descr.byteorder == c'<' and not little_endian)):
18747  * raise ValueError(u"Non-native byte order not supported")
18748  */
18749  }
18750 
18751  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":307
18752  * (descr.byteorder == c'<' and not little_endian)):
18753  * raise ValueError(u"Non-native byte order not supported")
18754  * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<<
18755  * elif t == NPY_UBYTE: f = "B"
18756  * elif t == NPY_SHORT: f = "h"
18757  */
18758  switch (__pyx_v_t) {
18759  case NPY_BYTE:
18760  __pyx_v_f = ((char *)"b");
18761  break;
18762  case NPY_UBYTE:
18763 
18764  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":308
18765  * raise ValueError(u"Non-native byte order not supported")
18766  * if t == NPY_BYTE: f = "b"
18767  * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<<
18768  * elif t == NPY_SHORT: f = "h"
18769  * elif t == NPY_USHORT: f = "H"
18770  */
18771  __pyx_v_f = ((char *)"B");
18772  break;
18773  case NPY_SHORT:
18774 
18775  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":309
18776  * if t == NPY_BYTE: f = "b"
18777  * elif t == NPY_UBYTE: f = "B"
18778  * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<<
18779  * elif t == NPY_USHORT: f = "H"
18780  * elif t == NPY_INT: f = "i"
18781  */
18782  __pyx_v_f = ((char *)"h");
18783  break;
18784  case NPY_USHORT:
18785 
18786  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":310
18787  * elif t == NPY_UBYTE: f = "B"
18788  * elif t == NPY_SHORT: f = "h"
18789  * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<<
18790  * elif t == NPY_INT: f = "i"
18791  * elif t == NPY_UINT: f = "I"
18792  */
18793  __pyx_v_f = ((char *)"H");
18794  break;
18795  case NPY_INT:
18796 
18797  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":311
18798  * elif t == NPY_SHORT: f = "h"
18799  * elif t == NPY_USHORT: f = "H"
18800  * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<<
18801  * elif t == NPY_UINT: f = "I"
18802  * elif t == NPY_LONG: f = "l"
18803  */
18804  __pyx_v_f = ((char *)"i");
18805  break;
18806  case NPY_UINT:
18807 
18808  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":312
18809  * elif t == NPY_USHORT: f = "H"
18810  * elif t == NPY_INT: f = "i"
18811  * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<<
18812  * elif t == NPY_LONG: f = "l"
18813  * elif t == NPY_ULONG: f = "L"
18814  */
18815  __pyx_v_f = ((char *)"I");
18816  break;
18817  case NPY_LONG:
18818 
18819  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":313
18820  * elif t == NPY_INT: f = "i"
18821  * elif t == NPY_UINT: f = "I"
18822  * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<<
18823  * elif t == NPY_ULONG: f = "L"
18824  * elif t == NPY_LONGLONG: f = "q"
18825  */
18826  __pyx_v_f = ((char *)"l");
18827  break;
18828  case NPY_ULONG:
18829 
18830  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":314
18831  * elif t == NPY_UINT: f = "I"
18832  * elif t == NPY_LONG: f = "l"
18833  * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<<
18834  * elif t == NPY_LONGLONG: f = "q"
18835  * elif t == NPY_ULONGLONG: f = "Q"
18836  */
18837  __pyx_v_f = ((char *)"L");
18838  break;
18839  case NPY_LONGLONG:
18840 
18841  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":315
18842  * elif t == NPY_LONG: f = "l"
18843  * elif t == NPY_ULONG: f = "L"
18844  * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<<
18845  * elif t == NPY_ULONGLONG: f = "Q"
18846  * elif t == NPY_FLOAT: f = "f"
18847  */
18848  __pyx_v_f = ((char *)"q");
18849  break;
18850  case NPY_ULONGLONG:
18851 
18852  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":316
18853  * elif t == NPY_ULONG: f = "L"
18854  * elif t == NPY_LONGLONG: f = "q"
18855  * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<<
18856  * elif t == NPY_FLOAT: f = "f"
18857  * elif t == NPY_DOUBLE: f = "d"
18858  */
18859  __pyx_v_f = ((char *)"Q");
18860  break;
18861  case NPY_FLOAT:
18862 
18863  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":317
18864  * elif t == NPY_LONGLONG: f = "q"
18865  * elif t == NPY_ULONGLONG: f = "Q"
18866  * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<<
18867  * elif t == NPY_DOUBLE: f = "d"
18868  * elif t == NPY_LONGDOUBLE: f = "g"
18869  */
18870  __pyx_v_f = ((char *)"f");
18871  break;
18872  case NPY_DOUBLE:
18873 
18874  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":318
18875  * elif t == NPY_ULONGLONG: f = "Q"
18876  * elif t == NPY_FLOAT: f = "f"
18877  * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<<
18878  * elif t == NPY_LONGDOUBLE: f = "g"
18879  * elif t == NPY_CFLOAT: f = "Zf"
18880  */
18881  __pyx_v_f = ((char *)"d");
18882  break;
18883  case NPY_LONGDOUBLE:
18884 
18885  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":319
18886  * elif t == NPY_FLOAT: f = "f"
18887  * elif t == NPY_DOUBLE: f = "d"
18888  * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<<
18889  * elif t == NPY_CFLOAT: f = "Zf"
18890  * elif t == NPY_CDOUBLE: f = "Zd"
18891  */
18892  __pyx_v_f = ((char *)"g");
18893  break;
18894  case NPY_CFLOAT:
18895 
18896  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":320
18897  * elif t == NPY_DOUBLE: f = "d"
18898  * elif t == NPY_LONGDOUBLE: f = "g"
18899  * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<<
18900  * elif t == NPY_CDOUBLE: f = "Zd"
18901  * elif t == NPY_CLONGDOUBLE: f = "Zg"
18902  */
18903  __pyx_v_f = ((char *)"Zf");
18904  break;
18905  case NPY_CDOUBLE:
18906 
18907  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":321
18908  * elif t == NPY_LONGDOUBLE: f = "g"
18909  * elif t == NPY_CFLOAT: f = "Zf"
18910  * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<<
18911  * elif t == NPY_CLONGDOUBLE: f = "Zg"
18912  * elif t == NPY_OBJECT: f = "O"
18913  */
18914  __pyx_v_f = ((char *)"Zd");
18915  break;
18916  case NPY_CLONGDOUBLE:
18917 
18918  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":322
18919  * elif t == NPY_CFLOAT: f = "Zf"
18920  * elif t == NPY_CDOUBLE: f = "Zd"
18921  * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<<
18922  * elif t == NPY_OBJECT: f = "O"
18923  * else:
18924  */
18925  __pyx_v_f = ((char *)"Zg");
18926  break;
18927  case NPY_OBJECT:
18928 
18929  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":323
18930  * elif t == NPY_CDOUBLE: f = "Zd"
18931  * elif t == NPY_CLONGDOUBLE: f = "Zg"
18932  * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<<
18933  * else:
18934  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
18935  */
18936  __pyx_v_f = ((char *)"O");
18937  break;
18938  default:
18939 
18940  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":325
18941  * elif t == NPY_OBJECT: f = "O"
18942  * else:
18943  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
18944  * info.format = f
18945  * return
18946  */
18947  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 325, __pyx_L1_error)
18948  __Pyx_GOTREF(__pyx_t_3);
18949  __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 325, __pyx_L1_error)
18950  __Pyx_GOTREF(__pyx_t_8);
18951  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18952  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 325, __pyx_L1_error)
18953  __Pyx_GOTREF(__pyx_t_3);
18954  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
18955  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
18956  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
18957  __PYX_ERR(3, 325, __pyx_L1_error)
18958  break;
18959  }
18960 
18961  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":326
18962  * else:
18963  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
18964  * info.format = f # <<<<<<<<<<<<<<
18965  * return
18966  * else:
18967  */
18968  __pyx_v_info->format = __pyx_v_f;
18969 
18970  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":327
18971  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
18972  * info.format = f
18973  * return # <<<<<<<<<<<<<<
18974  * else:
18975  * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
18976  */
18977  __pyx_r = 0;
18978  goto __pyx_L0;
18979 
18980  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302
18981  * info.obj = self
18982  *
18983  * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<<
18984  * t = descr.type_num
18985  * if ((descr.byteorder == c'>' and little_endian) or
18986  */
18987  }
18988 
18989  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":329
18990  * return
18991  * else:
18992  * info.format = <char*>PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<<
18993  * info.format[0] = c'^' # Native data types, manual alignment
18994  * offset = 0
18995  */
18996  /*else*/ {
18997  __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF));
18998 
18999  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":330
19000  * else:
19001  * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
19002  * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<<
19003  * offset = 0
19004  * f = _util_dtypestring(descr, info.format + 1,
19005  */
19006  (__pyx_v_info->format[0]) = '^';
19007 
19008  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":331
19009  * info.format = <char*>PyObject_Malloc(_buffer_format_string_len)
19010  * info.format[0] = c'^' # Native data types, manual alignment
19011  * offset = 0 # <<<<<<<<<<<<<<
19012  * f = _util_dtypestring(descr, info.format + 1,
19013  * info.format + _buffer_format_string_len,
19014  */
19015  __pyx_v_offset = 0;
19016 
19017  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":332
19018  * info.format[0] = c'^' # Native data types, manual alignment
19019  * offset = 0
19020  * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<<
19021  * info.format + _buffer_format_string_len,
19022  * &offset)
19023  */
19024  __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(3, 332, __pyx_L1_error)
19025  __pyx_v_f = __pyx_t_9;
19026 
19027  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":335
19028  * info.format + _buffer_format_string_len,
19029  * &offset)
19030  * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<<
19031  *
19032  * def __releasebuffer__(ndarray self, Py_buffer* info):
19033  */
19034  (__pyx_v_f[0]) = '\x00';
19035  }
19036 
19037  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258
19038  * # experimental exception made for __getbuffer__ and __releasebuffer__
19039  * # -- the details of this may change.
19040  * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
19041  * # This implementation of getbuffer is geared towards Cython
19042  * # requirements, and does not yet fulfill the PEP.
19043  */
19044 
19045  /* function exit code */
19046  __pyx_r = 0;
19047  goto __pyx_L0;
19048  __pyx_L1_error:;
19049  __Pyx_XDECREF(__pyx_t_3);
19050  __Pyx_XDECREF(__pyx_t_8);
19051  __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
19052  __pyx_r = -1;
19053  if (__pyx_v_info->obj != NULL) {
19054  __Pyx_GOTREF(__pyx_v_info->obj);
19055  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
19056  }
19057  goto __pyx_L2;
19058  __pyx_L0:;
19059  if (__pyx_v_info->obj == Py_None) {
19060  __Pyx_GOTREF(__pyx_v_info->obj);
19061  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
19062  }
19063  __pyx_L2:;
19064  __Pyx_XDECREF((PyObject *)__pyx_v_descr);
19065  __Pyx_RefNannyFinishContext();
19066  return __pyx_r;
19067 }
19068 
19069 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337
19070  * f[0] = c'\0' # Terminate format string
19071  *
19072  * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
19073  * if PyArray_HASFIELDS(self):
19074  * PyObject_Free(info.format)
19075  */
19076 
19077 /* Python wrapper */
19078 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
19079 static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
19080  __Pyx_RefNannyDeclarations
19081  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
19082  __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
19083 
19084  /* function exit code */
19085  __Pyx_RefNannyFinishContext();
19086 }
19087 
19088 static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
19089  __Pyx_RefNannyDeclarations
19090  int __pyx_t_1;
19091  __Pyx_RefNannySetupContext("__releasebuffer__", 0);
19092 
19093  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338
19094  *
19095  * def __releasebuffer__(ndarray self, Py_buffer* info):
19096  * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
19097  * PyObject_Free(info.format)
19098  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
19099  */
19100  __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0);
19101  if (__pyx_t_1) {
19102 
19103  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":339
19104  * def __releasebuffer__(ndarray self, Py_buffer* info):
19105  * if PyArray_HASFIELDS(self):
19106  * PyObject_Free(info.format) # <<<<<<<<<<<<<<
19107  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
19108  * PyObject_Free(info.strides)
19109  */
19110  PyObject_Free(__pyx_v_info->format);
19111 
19112  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338
19113  *
19114  * def __releasebuffer__(ndarray self, Py_buffer* info):
19115  * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<<
19116  * PyObject_Free(info.format)
19117  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
19118  */
19119  }
19120 
19121  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340
19122  * if PyArray_HASFIELDS(self):
19123  * PyObject_Free(info.format)
19124  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
19125  * PyObject_Free(info.strides)
19126  * # info.shape was stored after info.strides in the same block
19127  */
19128  __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0);
19129  if (__pyx_t_1) {
19130 
19131  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":341
19132  * PyObject_Free(info.format)
19133  * if sizeof(npy_intp) != sizeof(Py_ssize_t):
19134  * PyObject_Free(info.strides) # <<<<<<<<<<<<<<
19135  * # info.shape was stored after info.strides in the same block
19136  *
19137  */
19138  PyObject_Free(__pyx_v_info->strides);
19139 
19140  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340
19141  * if PyArray_HASFIELDS(self):
19142  * PyObject_Free(info.format)
19143  * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<<
19144  * PyObject_Free(info.strides)
19145  * # info.shape was stored after info.strides in the same block
19146  */
19147  }
19148 
19149  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337
19150  * f[0] = c'\0' # Terminate format string
19151  *
19152  * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<<
19153  * if PyArray_HASFIELDS(self):
19154  * PyObject_Free(info.format)
19155  */
19156 
19157  /* function exit code */
19158  __Pyx_RefNannyFinishContext();
19159 }
19160 
19161 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
19162  * ctypedef npy_cdouble complex_t
19163  *
19164  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
19165  * return PyArray_MultiIterNew(1, <void*>a)
19166  *
19167  */
19168 
19169 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) {
19170  PyObject *__pyx_r = NULL;
19171  __Pyx_RefNannyDeclarations
19172  PyObject *__pyx_t_1 = NULL;
19173  __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0);
19174 
19175  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":822
19176  *
19177  * cdef inline object PyArray_MultiIterNew1(a):
19178  * return PyArray_MultiIterNew(1, <void*>a) # <<<<<<<<<<<<<<
19179  *
19180  * cdef inline object PyArray_MultiIterNew2(a, b):
19181  */
19182  __Pyx_XDECREF(__pyx_r);
19183  __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 822, __pyx_L1_error)
19184  __Pyx_GOTREF(__pyx_t_1);
19185  __pyx_r = __pyx_t_1;
19186  __pyx_t_1 = 0;
19187  goto __pyx_L0;
19188 
19189  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821
19190  * ctypedef npy_cdouble complex_t
19191  *
19192  * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<<
19193  * return PyArray_MultiIterNew(1, <void*>a)
19194  *
19195  */
19196 
19197  /* function exit code */
19198  __pyx_L1_error:;
19199  __Pyx_XDECREF(__pyx_t_1);
19200  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename);
19201  __pyx_r = 0;
19202  __pyx_L0:;
19203  __Pyx_XGIVEREF(__pyx_r);
19204  __Pyx_RefNannyFinishContext();
19205  return __pyx_r;
19206 }
19207 
19208 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824
19209  * return PyArray_MultiIterNew(1, <void*>a)
19210  *
19211  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
19212  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
19213  *
19214  */
19215 
19216 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) {
19217  PyObject *__pyx_r = NULL;
19218  __Pyx_RefNannyDeclarations
19219  PyObject *__pyx_t_1 = NULL;
19220  __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0);
19221 
19222  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":825
19223  *
19224  * cdef inline object PyArray_MultiIterNew2(a, b):
19225  * return PyArray_MultiIterNew(2, <void*>a, <void*>b) # <<<<<<<<<<<<<<
19226  *
19227  * cdef inline object PyArray_MultiIterNew3(a, b, c):
19228  */
19229  __Pyx_XDECREF(__pyx_r);
19230  __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 825, __pyx_L1_error)
19231  __Pyx_GOTREF(__pyx_t_1);
19232  __pyx_r = __pyx_t_1;
19233  __pyx_t_1 = 0;
19234  goto __pyx_L0;
19235 
19236  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824
19237  * return PyArray_MultiIterNew(1, <void*>a)
19238  *
19239  * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<<
19240  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
19241  *
19242  */
19243 
19244  /* function exit code */
19245  __pyx_L1_error:;
19246  __Pyx_XDECREF(__pyx_t_1);
19247  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename);
19248  __pyx_r = 0;
19249  __pyx_L0:;
19250  __Pyx_XGIVEREF(__pyx_r);
19251  __Pyx_RefNannyFinishContext();
19252  return __pyx_r;
19253 }
19254 
19255 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
19256  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
19257  *
19258  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
19259  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19260  *
19261  */
19262 
19263 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) {
19264  PyObject *__pyx_r = NULL;
19265  __Pyx_RefNannyDeclarations
19266  PyObject *__pyx_t_1 = NULL;
19267  __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0);
19268 
19269  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":828
19270  *
19271  * cdef inline object PyArray_MultiIterNew3(a, b, c):
19272  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c) # <<<<<<<<<<<<<<
19273  *
19274  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
19275  */
19276  __Pyx_XDECREF(__pyx_r);
19277  __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 828, __pyx_L1_error)
19278  __Pyx_GOTREF(__pyx_t_1);
19279  __pyx_r = __pyx_t_1;
19280  __pyx_t_1 = 0;
19281  goto __pyx_L0;
19282 
19283  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827
19284  * return PyArray_MultiIterNew(2, <void*>a, <void*>b)
19285  *
19286  * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<<
19287  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19288  *
19289  */
19290 
19291  /* function exit code */
19292  __pyx_L1_error:;
19293  __Pyx_XDECREF(__pyx_t_1);
19294  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename);
19295  __pyx_r = 0;
19296  __pyx_L0:;
19297  __Pyx_XGIVEREF(__pyx_r);
19298  __Pyx_RefNannyFinishContext();
19299  return __pyx_r;
19300 }
19301 
19302 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
19303  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19304  *
19305  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
19306  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19307  *
19308  */
19309 
19310 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) {
19311  PyObject *__pyx_r = NULL;
19312  __Pyx_RefNannyDeclarations
19313  PyObject *__pyx_t_1 = NULL;
19314  __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0);
19315 
19316  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":831
19317  *
19318  * cdef inline object PyArray_MultiIterNew4(a, b, c, d):
19319  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d) # <<<<<<<<<<<<<<
19320  *
19321  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
19322  */
19323  __Pyx_XDECREF(__pyx_r);
19324  __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 831, __pyx_L1_error)
19325  __Pyx_GOTREF(__pyx_t_1);
19326  __pyx_r = __pyx_t_1;
19327  __pyx_t_1 = 0;
19328  goto __pyx_L0;
19329 
19330  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830
19331  * return PyArray_MultiIterNew(3, <void*>a, <void*>b, <void*> c)
19332  *
19333  * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<<
19334  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19335  *
19336  */
19337 
19338  /* function exit code */
19339  __pyx_L1_error:;
19340  __Pyx_XDECREF(__pyx_t_1);
19341  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename);
19342  __pyx_r = 0;
19343  __pyx_L0:;
19344  __Pyx_XGIVEREF(__pyx_r);
19345  __Pyx_RefNannyFinishContext();
19346  return __pyx_r;
19347 }
19348 
19349 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
19350  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19351  *
19352  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
19353  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19354  *
19355  */
19356 
19357 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) {
19358  PyObject *__pyx_r = NULL;
19359  __Pyx_RefNannyDeclarations
19360  PyObject *__pyx_t_1 = NULL;
19361  __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0);
19362 
19363  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":834
19364  *
19365  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e):
19366  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e) # <<<<<<<<<<<<<<
19367  *
19368  * cdef inline tuple PyDataType_SHAPE(dtype d):
19369  */
19370  __Pyx_XDECREF(__pyx_r);
19371  __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 834, __pyx_L1_error)
19372  __Pyx_GOTREF(__pyx_t_1);
19373  __pyx_r = __pyx_t_1;
19374  __pyx_t_1 = 0;
19375  goto __pyx_L0;
19376 
19377  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833
19378  * return PyArray_MultiIterNew(4, <void*>a, <void*>b, <void*>c, <void*> d)
19379  *
19380  * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<<
19381  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19382  *
19383  */
19384 
19385  /* function exit code */
19386  __pyx_L1_error:;
19387  __Pyx_XDECREF(__pyx_t_1);
19388  __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename);
19389  __pyx_r = 0;
19390  __pyx_L0:;
19391  __Pyx_XGIVEREF(__pyx_r);
19392  __Pyx_RefNannyFinishContext();
19393  return __pyx_r;
19394 }
19395 
19396 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
19397  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19398  *
19399  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
19400  * if PyDataType_HASSUBARRAY(d):
19401  * return <tuple>d.subarray.shape
19402  */
19403 
19404 static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) {
19405  PyObject *__pyx_r = NULL;
19406  __Pyx_RefNannyDeclarations
19407  int __pyx_t_1;
19408  __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0);
19409 
19410  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
19411  *
19412  * cdef inline tuple PyDataType_SHAPE(dtype d):
19413  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
19414  * return <tuple>d.subarray.shape
19415  * else:
19416  */
19417  __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0);
19418  if (__pyx_t_1) {
19419 
19420  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":838
19421  * cdef inline tuple PyDataType_SHAPE(dtype d):
19422  * if PyDataType_HASSUBARRAY(d):
19423  * return <tuple>d.subarray.shape # <<<<<<<<<<<<<<
19424  * else:
19425  * return ()
19426  */
19427  __Pyx_XDECREF(__pyx_r);
19428  __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
19429  __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
19430  goto __pyx_L0;
19431 
19432  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837
19433  *
19434  * cdef inline tuple PyDataType_SHAPE(dtype d):
19435  * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<<
19436  * return <tuple>d.subarray.shape
19437  * else:
19438  */
19439  }
19440 
19441  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":840
19442  * return <tuple>d.subarray.shape
19443  * else:
19444  * return () # <<<<<<<<<<<<<<
19445  *
19446  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL:
19447  */
19448  /*else*/ {
19449  __Pyx_XDECREF(__pyx_r);
19450  __Pyx_INCREF(__pyx_empty_tuple);
19451  __pyx_r = __pyx_empty_tuple;
19452  goto __pyx_L0;
19453  }
19454 
19455  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836
19456  * return PyArray_MultiIterNew(5, <void*>a, <void*>b, <void*>c, <void*> d, <void*> e)
19457  *
19458  * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<<
19459  * if PyDataType_HASSUBARRAY(d):
19460  * return <tuple>d.subarray.shape
19461  */
19462 
19463  /* function exit code */
19464  __pyx_L0:;
19465  __Pyx_XGIVEREF(__pyx_r);
19466  __Pyx_RefNannyFinishContext();
19467  return __pyx_r;
19468 }
19469 
19470 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
19471  * return ()
19472  *
19473  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
19474  * # Recursive utility function used in __getbuffer__ to get format
19475  * # string. The new location in the format string is returned.
19476  */
19477 
19478 static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) {
19479  PyArray_Descr *__pyx_v_child = 0;
19480  int __pyx_v_endian_detector;
19481  int __pyx_v_little_endian;
19482  PyObject *__pyx_v_fields = 0;
19483  PyObject *__pyx_v_childname = NULL;
19484  PyObject *__pyx_v_new_offset = NULL;
19485  PyObject *__pyx_v_t = NULL;
19486  char *__pyx_r;
19487  __Pyx_RefNannyDeclarations
19488  PyObject *__pyx_t_1 = NULL;
19489  Py_ssize_t __pyx_t_2;
19490  PyObject *__pyx_t_3 = NULL;
19491  PyObject *__pyx_t_4 = NULL;
19492  int __pyx_t_5;
19493  int __pyx_t_6;
19494  int __pyx_t_7;
19495  long __pyx_t_8;
19496  char *__pyx_t_9;
19497  __Pyx_RefNannySetupContext("_util_dtypestring", 0);
19498 
19499  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":847
19500  *
19501  * cdef dtype child
19502  * cdef int endian_detector = 1 # <<<<<<<<<<<<<<
19503  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0)
19504  * cdef tuple fields
19505  */
19506  __pyx_v_endian_detector = 1;
19507 
19508  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":848
19509  * cdef dtype child
19510  * cdef int endian_detector = 1
19511  * cdef bint little_endian = ((<char*>&endian_detector)[0] != 0) # <<<<<<<<<<<<<<
19512  * cdef tuple fields
19513  *
19514  */
19515  __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0);
19516 
19517  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851
19518  * cdef tuple fields
19519  *
19520  * for childname in descr.names: # <<<<<<<<<<<<<<
19521  * fields = descr.fields[childname]
19522  * child, new_offset = fields
19523  */
19524  if (unlikely(__pyx_v_descr->names == Py_None)) {
19525  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
19526  __PYX_ERR(3, 851, __pyx_L1_error)
19527  }
19528  __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
19529  for (;;) {
19530  if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
19531  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19532  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(3, 851, __pyx_L1_error)
19533  #else
19534  __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 851, __pyx_L1_error)
19535  __Pyx_GOTREF(__pyx_t_3);
19536  #endif
19537  __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3);
19538  __pyx_t_3 = 0;
19539 
19540  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":852
19541  *
19542  * for childname in descr.names:
19543  * fields = descr.fields[childname] # <<<<<<<<<<<<<<
19544  * child, new_offset = fields
19545  *
19546  */
19547  if (unlikely(__pyx_v_descr->fields == Py_None)) {
19548  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
19549  __PYX_ERR(3, 852, __pyx_L1_error)
19550  }
19551  __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 852, __pyx_L1_error)
19552  __Pyx_GOTREF(__pyx_t_3);
19553  if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(3, 852, __pyx_L1_error)
19554  __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3));
19555  __pyx_t_3 = 0;
19556 
19557  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":853
19558  * for childname in descr.names:
19559  * fields = descr.fields[childname]
19560  * child, new_offset = fields # <<<<<<<<<<<<<<
19561  *
19562  * if (end - f) - <int>(new_offset - offset[0]) < 15:
19563  */
19564  if (likely(__pyx_v_fields != Py_None)) {
19565  PyObject* sequence = __pyx_v_fields;
19566  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
19567  if (unlikely(size != 2)) {
19568  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
19569  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
19570  __PYX_ERR(3, 853, __pyx_L1_error)
19571  }
19572  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
19573  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
19574  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
19575  __Pyx_INCREF(__pyx_t_3);
19576  __Pyx_INCREF(__pyx_t_4);
19577  #else
19578  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 853, __pyx_L1_error)
19579  __Pyx_GOTREF(__pyx_t_3);
19580  __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 853, __pyx_L1_error)
19581  __Pyx_GOTREF(__pyx_t_4);
19582  #endif
19583  } else {
19584  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(3, 853, __pyx_L1_error)
19585  }
19586  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(3, 853, __pyx_L1_error)
19587  __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3));
19588  __pyx_t_3 = 0;
19589  __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4);
19590  __pyx_t_4 = 0;
19591 
19592  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855
19593  * child, new_offset = fields
19594  *
19595  * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
19596  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
19597  *
19598  */
19599  __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 855, __pyx_L1_error)
19600  __Pyx_GOTREF(__pyx_t_4);
19601  __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 855, __pyx_L1_error)
19602  __Pyx_GOTREF(__pyx_t_3);
19603  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19604  __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 855, __pyx_L1_error)
19605  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19606  __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0);
19607  if (unlikely(__pyx_t_6)) {
19608 
19609  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856
19610  *
19611  * if (end - f) - <int>(new_offset - offset[0]) < 15:
19612  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
19613  *
19614  * if ((child.byteorder == c'>' and little_endian) or
19615  */
19616  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 856, __pyx_L1_error)
19617  __Pyx_GOTREF(__pyx_t_3);
19618  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
19619  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19620  __PYX_ERR(3, 856, __pyx_L1_error)
19621 
19622  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855
19623  * child, new_offset = fields
19624  *
19625  * if (end - f) - <int>(new_offset - offset[0]) < 15: # <<<<<<<<<<<<<<
19626  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
19627  *
19628  */
19629  }
19630 
19631  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
19632  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
19633  *
19634  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
19635  * (child.byteorder == c'<' and not little_endian)):
19636  * raise ValueError(u"Non-native byte order not supported")
19637  */
19638  __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0);
19639  if (!__pyx_t_7) {
19640  goto __pyx_L8_next_or;
19641  } else {
19642  }
19643  __pyx_t_7 = (__pyx_v_little_endian != 0);
19644  if (!__pyx_t_7) {
19645  } else {
19646  __pyx_t_6 = __pyx_t_7;
19647  goto __pyx_L7_bool_binop_done;
19648  }
19649  __pyx_L8_next_or:;
19650 
19651  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":859
19652  *
19653  * if ((child.byteorder == c'>' and little_endian) or
19654  * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<<
19655  * raise ValueError(u"Non-native byte order not supported")
19656  * # One could encode it in the format string and have Cython
19657  */
19658  __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0);
19659  if (__pyx_t_7) {
19660  } else {
19661  __pyx_t_6 = __pyx_t_7;
19662  goto __pyx_L7_bool_binop_done;
19663  }
19664  __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0);
19665  __pyx_t_6 = __pyx_t_7;
19666  __pyx_L7_bool_binop_done:;
19667 
19668  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
19669  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
19670  *
19671  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
19672  * (child.byteorder == c'<' and not little_endian)):
19673  * raise ValueError(u"Non-native byte order not supported")
19674  */
19675  if (unlikely(__pyx_t_6)) {
19676 
19677  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":860
19678  * if ((child.byteorder == c'>' and little_endian) or
19679  * (child.byteorder == c'<' and not little_endian)):
19680  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
19681  * # One could encode it in the format string and have Cython
19682  * # complain instead, BUT: < and > in format strings also imply
19683  */
19684  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 860, __pyx_L1_error)
19685  __Pyx_GOTREF(__pyx_t_3);
19686  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
19687  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19688  __PYX_ERR(3, 860, __pyx_L1_error)
19689 
19690  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858
19691  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd")
19692  *
19693  * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<<
19694  * (child.byteorder == c'<' and not little_endian)):
19695  * raise ValueError(u"Non-native byte order not supported")
19696  */
19697  }
19698 
19699  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":870
19700  *
19701  * # Output padding bytes
19702  * while offset[0] < new_offset: # <<<<<<<<<<<<<<
19703  * f[0] = 120 # "x"; pad byte
19704  * f += 1
19705  */
19706  while (1) {
19707  __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 870, __pyx_L1_error)
19708  __Pyx_GOTREF(__pyx_t_3);
19709  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 870, __pyx_L1_error)
19710  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19711  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 870, __pyx_L1_error)
19712  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19713  if (!__pyx_t_6) break;
19714 
19715  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":871
19716  * # Output padding bytes
19717  * while offset[0] < new_offset:
19718  * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<<
19719  * f += 1
19720  * offset[0] += 1
19721  */
19722  (__pyx_v_f[0]) = 0x78;
19723 
19724  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":872
19725  * while offset[0] < new_offset:
19726  * f[0] = 120 # "x"; pad byte
19727  * f += 1 # <<<<<<<<<<<<<<
19728  * offset[0] += 1
19729  *
19730  */
19731  __pyx_v_f = (__pyx_v_f + 1);
19732 
19733  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":873
19734  * f[0] = 120 # "x"; pad byte
19735  * f += 1
19736  * offset[0] += 1 # <<<<<<<<<<<<<<
19737  *
19738  * offset[0] += child.itemsize
19739  */
19740  __pyx_t_8 = 0;
19741  (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1);
19742  }
19743 
19744  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":875
19745  * offset[0] += 1
19746  *
19747  * offset[0] += child.itemsize # <<<<<<<<<<<<<<
19748  *
19749  * if not PyDataType_HASFIELDS(child):
19750  */
19751  __pyx_t_8 = 0;
19752  (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize);
19753 
19754  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877
19755  * offset[0] += child.itemsize
19756  *
19757  * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
19758  * t = child.type_num
19759  * if end - f < 5:
19760  */
19761  __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0);
19762  if (__pyx_t_6) {
19763 
19764  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":878
19765  *
19766  * if not PyDataType_HASFIELDS(child):
19767  * t = child.type_num # <<<<<<<<<<<<<<
19768  * if end - f < 5:
19769  * raise RuntimeError(u"Format string allocated too short.")
19770  */
19771  __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 878, __pyx_L1_error)
19772  __Pyx_GOTREF(__pyx_t_4);
19773  __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4);
19774  __pyx_t_4 = 0;
19775 
19776  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879
19777  * if not PyDataType_HASFIELDS(child):
19778  * t = child.type_num
19779  * if end - f < 5: # <<<<<<<<<<<<<<
19780  * raise RuntimeError(u"Format string allocated too short.")
19781  *
19782  */
19783  __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0);
19784  if (unlikely(__pyx_t_6)) {
19785 
19786  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880
19787  * t = child.type_num
19788  * if end - f < 5:
19789  * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
19790  *
19791  * # Until ticket #99 is fixed, use integers to avoid warnings
19792  */
19793  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 880, __pyx_L1_error)
19794  __Pyx_GOTREF(__pyx_t_4);
19795  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
19796  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19797  __PYX_ERR(3, 880, __pyx_L1_error)
19798 
19799  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879
19800  * if not PyDataType_HASFIELDS(child):
19801  * t = child.type_num
19802  * if end - f < 5: # <<<<<<<<<<<<<<
19803  * raise RuntimeError(u"Format string allocated too short.")
19804  *
19805  */
19806  }
19807 
19808  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":883
19809  *
19810  * # Until ticket #99 is fixed, use integers to avoid warnings
19811  * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<<
19812  * elif t == NPY_UBYTE: f[0] = 66 #"B"
19813  * elif t == NPY_SHORT: f[0] = 104 #"h"
19814  */
19815  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 883, __pyx_L1_error)
19816  __Pyx_GOTREF(__pyx_t_4);
19817  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 883, __pyx_L1_error)
19818  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19819  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 883, __pyx_L1_error)
19820  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19821  if (__pyx_t_6) {
19822  (__pyx_v_f[0]) = 98;
19823  goto __pyx_L15;
19824  }
19825 
19826  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":884
19827  * # Until ticket #99 is fixed, use integers to avoid warnings
19828  * if t == NPY_BYTE: f[0] = 98 #"b"
19829  * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<<
19830  * elif t == NPY_SHORT: f[0] = 104 #"h"
19831  * elif t == NPY_USHORT: f[0] = 72 #"H"
19832  */
19833  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 884, __pyx_L1_error)
19834  __Pyx_GOTREF(__pyx_t_3);
19835  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 884, __pyx_L1_error)
19836  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19837  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 884, __pyx_L1_error)
19838  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19839  if (__pyx_t_6) {
19840  (__pyx_v_f[0]) = 66;
19841  goto __pyx_L15;
19842  }
19843 
19844  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":885
19845  * if t == NPY_BYTE: f[0] = 98 #"b"
19846  * elif t == NPY_UBYTE: f[0] = 66 #"B"
19847  * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<<
19848  * elif t == NPY_USHORT: f[0] = 72 #"H"
19849  * elif t == NPY_INT: f[0] = 105 #"i"
19850  */
19851  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 885, __pyx_L1_error)
19852  __Pyx_GOTREF(__pyx_t_4);
19853  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 885, __pyx_L1_error)
19854  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19855  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 885, __pyx_L1_error)
19856  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19857  if (__pyx_t_6) {
19858  (__pyx_v_f[0]) = 0x68;
19859  goto __pyx_L15;
19860  }
19861 
19862  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":886
19863  * elif t == NPY_UBYTE: f[0] = 66 #"B"
19864  * elif t == NPY_SHORT: f[0] = 104 #"h"
19865  * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<<
19866  * elif t == NPY_INT: f[0] = 105 #"i"
19867  * elif t == NPY_UINT: f[0] = 73 #"I"
19868  */
19869  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 886, __pyx_L1_error)
19870  __Pyx_GOTREF(__pyx_t_3);
19871  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 886, __pyx_L1_error)
19872  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19873  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 886, __pyx_L1_error)
19874  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19875  if (__pyx_t_6) {
19876  (__pyx_v_f[0]) = 72;
19877  goto __pyx_L15;
19878  }
19879 
19880  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":887
19881  * elif t == NPY_SHORT: f[0] = 104 #"h"
19882  * elif t == NPY_USHORT: f[0] = 72 #"H"
19883  * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<<
19884  * elif t == NPY_UINT: f[0] = 73 #"I"
19885  * elif t == NPY_LONG: f[0] = 108 #"l"
19886  */
19887  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 887, __pyx_L1_error)
19888  __Pyx_GOTREF(__pyx_t_4);
19889  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 887, __pyx_L1_error)
19890  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19891  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 887, __pyx_L1_error)
19892  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19893  if (__pyx_t_6) {
19894  (__pyx_v_f[0]) = 0x69;
19895  goto __pyx_L15;
19896  }
19897 
19898  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":888
19899  * elif t == NPY_USHORT: f[0] = 72 #"H"
19900  * elif t == NPY_INT: f[0] = 105 #"i"
19901  * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<<
19902  * elif t == NPY_LONG: f[0] = 108 #"l"
19903  * elif t == NPY_ULONG: f[0] = 76 #"L"
19904  */
19905  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 888, __pyx_L1_error)
19906  __Pyx_GOTREF(__pyx_t_3);
19907  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 888, __pyx_L1_error)
19908  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19909  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 888, __pyx_L1_error)
19910  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19911  if (__pyx_t_6) {
19912  (__pyx_v_f[0]) = 73;
19913  goto __pyx_L15;
19914  }
19915 
19916  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":889
19917  * elif t == NPY_INT: f[0] = 105 #"i"
19918  * elif t == NPY_UINT: f[0] = 73 #"I"
19919  * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<<
19920  * elif t == NPY_ULONG: f[0] = 76 #"L"
19921  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
19922  */
19923  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 889, __pyx_L1_error)
19924  __Pyx_GOTREF(__pyx_t_4);
19925  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 889, __pyx_L1_error)
19926  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19927  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 889, __pyx_L1_error)
19928  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19929  if (__pyx_t_6) {
19930  (__pyx_v_f[0]) = 0x6C;
19931  goto __pyx_L15;
19932  }
19933 
19934  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":890
19935  * elif t == NPY_UINT: f[0] = 73 #"I"
19936  * elif t == NPY_LONG: f[0] = 108 #"l"
19937  * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<<
19938  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
19939  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
19940  */
19941  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 890, __pyx_L1_error)
19942  __Pyx_GOTREF(__pyx_t_3);
19943  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 890, __pyx_L1_error)
19944  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19945  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 890, __pyx_L1_error)
19946  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19947  if (__pyx_t_6) {
19948  (__pyx_v_f[0]) = 76;
19949  goto __pyx_L15;
19950  }
19951 
19952  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":891
19953  * elif t == NPY_LONG: f[0] = 108 #"l"
19954  * elif t == NPY_ULONG: f[0] = 76 #"L"
19955  * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<<
19956  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
19957  * elif t == NPY_FLOAT: f[0] = 102 #"f"
19958  */
19959  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 891, __pyx_L1_error)
19960  __Pyx_GOTREF(__pyx_t_4);
19961  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 891, __pyx_L1_error)
19962  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19963  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 891, __pyx_L1_error)
19964  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19965  if (__pyx_t_6) {
19966  (__pyx_v_f[0]) = 0x71;
19967  goto __pyx_L15;
19968  }
19969 
19970  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":892
19971  * elif t == NPY_ULONG: f[0] = 76 #"L"
19972  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
19973  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<<
19974  * elif t == NPY_FLOAT: f[0] = 102 #"f"
19975  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
19976  */
19977  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 892, __pyx_L1_error)
19978  __Pyx_GOTREF(__pyx_t_3);
19979  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 892, __pyx_L1_error)
19980  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
19981  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 892, __pyx_L1_error)
19982  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19983  if (__pyx_t_6) {
19984  (__pyx_v_f[0]) = 81;
19985  goto __pyx_L15;
19986  }
19987 
19988  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":893
19989  * elif t == NPY_LONGLONG: f[0] = 113 #"q"
19990  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
19991  * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<<
19992  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
19993  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
19994  */
19995  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 893, __pyx_L1_error)
19996  __Pyx_GOTREF(__pyx_t_4);
19997  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 893, __pyx_L1_error)
19998  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
19999  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 893, __pyx_L1_error)
20000  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20001  if (__pyx_t_6) {
20002  (__pyx_v_f[0]) = 0x66;
20003  goto __pyx_L15;
20004  }
20005 
20006  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":894
20007  * elif t == NPY_ULONGLONG: f[0] = 81 #"Q"
20008  * elif t == NPY_FLOAT: f[0] = 102 #"f"
20009  * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<<
20010  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
20011  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
20012  */
20013  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 894, __pyx_L1_error)
20014  __Pyx_GOTREF(__pyx_t_3);
20015  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 894, __pyx_L1_error)
20016  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20017  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 894, __pyx_L1_error)
20018  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20019  if (__pyx_t_6) {
20020  (__pyx_v_f[0]) = 0x64;
20021  goto __pyx_L15;
20022  }
20023 
20024  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":895
20025  * elif t == NPY_FLOAT: f[0] = 102 #"f"
20026  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
20027  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<<
20028  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
20029  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
20030  */
20031  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 895, __pyx_L1_error)
20032  __Pyx_GOTREF(__pyx_t_4);
20033  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 895, __pyx_L1_error)
20034  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20035  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 895, __pyx_L1_error)
20036  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20037  if (__pyx_t_6) {
20038  (__pyx_v_f[0]) = 0x67;
20039  goto __pyx_L15;
20040  }
20041 
20042  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":896
20043  * elif t == NPY_DOUBLE: f[0] = 100 #"d"
20044  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
20045  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<<
20046  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
20047  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
20048  */
20049  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 896, __pyx_L1_error)
20050  __Pyx_GOTREF(__pyx_t_3);
20051  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 896, __pyx_L1_error)
20052  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20053  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 896, __pyx_L1_error)
20054  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20055  if (__pyx_t_6) {
20056  (__pyx_v_f[0]) = 90;
20057  (__pyx_v_f[1]) = 0x66;
20058  __pyx_v_f = (__pyx_v_f + 1);
20059  goto __pyx_L15;
20060  }
20061 
20062  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":897
20063  * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g"
20064  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
20065  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<<
20066  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
20067  * elif t == NPY_OBJECT: f[0] = 79 #"O"
20068  */
20069  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 897, __pyx_L1_error)
20070  __Pyx_GOTREF(__pyx_t_4);
20071  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 897, __pyx_L1_error)
20072  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20073  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 897, __pyx_L1_error)
20074  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20075  if (__pyx_t_6) {
20076  (__pyx_v_f[0]) = 90;
20077  (__pyx_v_f[1]) = 0x64;
20078  __pyx_v_f = (__pyx_v_f + 1);
20079  goto __pyx_L15;
20080  }
20081 
20082  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":898
20083  * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf
20084  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
20085  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<<
20086  * elif t == NPY_OBJECT: f[0] = 79 #"O"
20087  * else:
20088  */
20089  __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 898, __pyx_L1_error)
20090  __Pyx_GOTREF(__pyx_t_3);
20091  __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 898, __pyx_L1_error)
20092  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20093  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 898, __pyx_L1_error)
20094  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20095  if (__pyx_t_6) {
20096  (__pyx_v_f[0]) = 90;
20097  (__pyx_v_f[1]) = 0x67;
20098  __pyx_v_f = (__pyx_v_f + 1);
20099  goto __pyx_L15;
20100  }
20101 
20102  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":899
20103  * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd
20104  * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg
20105  * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<<
20106  * else:
20107  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
20108  */
20109  __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 899, __pyx_L1_error)
20110  __Pyx_GOTREF(__pyx_t_4);
20111  __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 899, __pyx_L1_error)
20112  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20113  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 899, __pyx_L1_error)
20114  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20115  if (likely(__pyx_t_6)) {
20116  (__pyx_v_f[0]) = 79;
20117  goto __pyx_L15;
20118  }
20119 
20120  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":901
20121  * elif t == NPY_OBJECT: f[0] = 79 #"O"
20122  * else:
20123  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<<
20124  * f += 1
20125  * else:
20126  */
20127  /*else*/ {
20128  __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 901, __pyx_L1_error)
20129  __Pyx_GOTREF(__pyx_t_3);
20130  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 901, __pyx_L1_error)
20131  __Pyx_GOTREF(__pyx_t_4);
20132  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20133  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
20134  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
20135  __PYX_ERR(3, 901, __pyx_L1_error)
20136  }
20137  __pyx_L15:;
20138 
20139  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":902
20140  * else:
20141  * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t)
20142  * f += 1 # <<<<<<<<<<<<<<
20143  * else:
20144  * # Cython ignores struct boundary information ("T{...}"),
20145  */
20146  __pyx_v_f = (__pyx_v_f + 1);
20147 
20148  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877
20149  * offset[0] += child.itemsize
20150  *
20151  * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<<
20152  * t = child.type_num
20153  * if end - f < 5:
20154  */
20155  goto __pyx_L13;
20156  }
20157 
20158  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":906
20159  * # Cython ignores struct boundary information ("T{...}"),
20160  * # so don't output it
20161  * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<<
20162  * return f
20163  *
20164  */
20165  /*else*/ {
20166  __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(3, 906, __pyx_L1_error)
20167  __pyx_v_f = __pyx_t_9;
20168  }
20169  __pyx_L13:;
20170 
20171  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851
20172  * cdef tuple fields
20173  *
20174  * for childname in descr.names: # <<<<<<<<<<<<<<
20175  * fields = descr.fields[childname]
20176  * child, new_offset = fields
20177  */
20178  }
20179  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
20180 
20181  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":907
20182  * # so don't output it
20183  * f = _util_dtypestring(child, f, end, offset)
20184  * return f # <<<<<<<<<<<<<<
20185  *
20186  *
20187  */
20188  __pyx_r = __pyx_v_f;
20189  goto __pyx_L0;
20190 
20191  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842
20192  * return ()
20193  *
20194  * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<<
20195  * # Recursive utility function used in __getbuffer__ to get format
20196  * # string. The new location in the format string is returned.
20197  */
20198 
20199  /* function exit code */
20200  __pyx_L1_error:;
20201  __Pyx_XDECREF(__pyx_t_1);
20202  __Pyx_XDECREF(__pyx_t_3);
20203  __Pyx_XDECREF(__pyx_t_4);
20204  __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename);
20205  __pyx_r = NULL;
20206  __pyx_L0:;
20207  __Pyx_XDECREF((PyObject *)__pyx_v_child);
20208  __Pyx_XDECREF(__pyx_v_fields);
20209  __Pyx_XDECREF(__pyx_v_childname);
20210  __Pyx_XDECREF(__pyx_v_new_offset);
20211  __Pyx_XDECREF(__pyx_v_t);
20212  __Pyx_RefNannyFinishContext();
20213  return __pyx_r;
20214 }
20215 
20216 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022
20217  * int _import_umath() except -1
20218  *
20219  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
20220  * Py_INCREF(base) # important to do this before stealing the reference below!
20221  * PyArray_SetBaseObject(arr, base)
20222  */
20223 
20224 static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) {
20225  __Pyx_RefNannyDeclarations
20226  __Pyx_RefNannySetupContext("set_array_base", 0);
20227 
20228  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1023
20229  *
20230  * cdef inline void set_array_base(ndarray arr, object base):
20231  * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<<
20232  * PyArray_SetBaseObject(arr, base)
20233  *
20234  */
20235  Py_INCREF(__pyx_v_base);
20236 
20237  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1024
20238  * cdef inline void set_array_base(ndarray arr, object base):
20239  * Py_INCREF(base) # important to do this before stealing the reference below!
20240  * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<<
20241  *
20242  * cdef inline object get_array_base(ndarray arr):
20243  */
20244  (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base));
20245 
20246  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022
20247  * int _import_umath() except -1
20248  *
20249  * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<<
20250  * Py_INCREF(base) # important to do this before stealing the reference below!
20251  * PyArray_SetBaseObject(arr, base)
20252  */
20253 
20254  /* function exit code */
20255  __Pyx_RefNannyFinishContext();
20256 }
20257 
20258 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026
20259  * PyArray_SetBaseObject(arr, base)
20260  *
20261  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
20262  * base = PyArray_BASE(arr)
20263  * if base is NULL:
20264  */
20265 
20266 static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) {
20267  PyObject *__pyx_v_base;
20268  PyObject *__pyx_r = NULL;
20269  __Pyx_RefNannyDeclarations
20270  int __pyx_t_1;
20271  __Pyx_RefNannySetupContext("get_array_base", 0);
20272 
20273  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1027
20274  *
20275  * cdef inline object get_array_base(ndarray arr):
20276  * base = PyArray_BASE(arr) # <<<<<<<<<<<<<<
20277  * if base is NULL:
20278  * return None
20279  */
20280  __pyx_v_base = PyArray_BASE(__pyx_v_arr);
20281 
20282  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028
20283  * cdef inline object get_array_base(ndarray arr):
20284  * base = PyArray_BASE(arr)
20285  * if base is NULL: # <<<<<<<<<<<<<<
20286  * return None
20287  * return <object>base
20288  */
20289  __pyx_t_1 = ((__pyx_v_base == NULL) != 0);
20290  if (__pyx_t_1) {
20291 
20292  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1029
20293  * base = PyArray_BASE(arr)
20294  * if base is NULL:
20295  * return None # <<<<<<<<<<<<<<
20296  * return <object>base
20297  *
20298  */
20299  __Pyx_XDECREF(__pyx_r);
20300  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
20301  goto __pyx_L0;
20302 
20303  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028
20304  * cdef inline object get_array_base(ndarray arr):
20305  * base = PyArray_BASE(arr)
20306  * if base is NULL: # <<<<<<<<<<<<<<
20307  * return None
20308  * return <object>base
20309  */
20310  }
20311 
20312  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1030
20313  * if base is NULL:
20314  * return None
20315  * return <object>base # <<<<<<<<<<<<<<
20316  *
20317  * # Versions of the import_* functions which are more suitable for
20318  */
20319  __Pyx_XDECREF(__pyx_r);
20320  __Pyx_INCREF(((PyObject *)__pyx_v_base));
20321  __pyx_r = ((PyObject *)__pyx_v_base);
20322  goto __pyx_L0;
20323 
20324  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026
20325  * PyArray_SetBaseObject(arr, base)
20326  *
20327  * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<<
20328  * base = PyArray_BASE(arr)
20329  * if base is NULL:
20330  */
20331 
20332  /* function exit code */
20333  __pyx_L0:;
20334  __Pyx_XGIVEREF(__pyx_r);
20335  __Pyx_RefNannyFinishContext();
20336  return __pyx_r;
20337 }
20338 
20339 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034
20340  * # Versions of the import_* functions which are more suitable for
20341  * # Cython code.
20342  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
20343  * try:
20344  * _import_array()
20345  */
20346 
20347 static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) {
20348  int __pyx_r;
20349  __Pyx_RefNannyDeclarations
20350  PyObject *__pyx_t_1 = NULL;
20351  PyObject *__pyx_t_2 = NULL;
20352  PyObject *__pyx_t_3 = NULL;
20353  int __pyx_t_4;
20354  PyObject *__pyx_t_5 = NULL;
20355  PyObject *__pyx_t_6 = NULL;
20356  PyObject *__pyx_t_7 = NULL;
20357  PyObject *__pyx_t_8 = NULL;
20358  __Pyx_RefNannySetupContext("import_array", 0);
20359 
20360  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
20361  * # Cython code.
20362  * cdef inline int import_array() except -1:
20363  * try: # <<<<<<<<<<<<<<
20364  * _import_array()
20365  * except Exception:
20366  */
20367  {
20368  __Pyx_PyThreadState_declare
20369  __Pyx_PyThreadState_assign
20370  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
20371  __Pyx_XGOTREF(__pyx_t_1);
20372  __Pyx_XGOTREF(__pyx_t_2);
20373  __Pyx_XGOTREF(__pyx_t_3);
20374  /*try:*/ {
20375 
20376  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1036
20377  * cdef inline int import_array() except -1:
20378  * try:
20379  * _import_array() # <<<<<<<<<<<<<<
20380  * except Exception:
20381  * raise ImportError("numpy.core.multiarray failed to import")
20382  */
20383  __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1036, __pyx_L3_error)
20384 
20385  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
20386  * # Cython code.
20387  * cdef inline int import_array() except -1:
20388  * try: # <<<<<<<<<<<<<<
20389  * _import_array()
20390  * except Exception:
20391  */
20392  }
20393  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
20394  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20395  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20396  goto __pyx_L8_try_end;
20397  __pyx_L3_error:;
20398 
20399  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1037
20400  * try:
20401  * _import_array()
20402  * except Exception: # <<<<<<<<<<<<<<
20403  * raise ImportError("numpy.core.multiarray failed to import")
20404  *
20405  */
20406  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
20407  if (__pyx_t_4) {
20408  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
20409  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1037, __pyx_L5_except_error)
20410  __Pyx_GOTREF(__pyx_t_5);
20411  __Pyx_GOTREF(__pyx_t_6);
20412  __Pyx_GOTREF(__pyx_t_7);
20413 
20414  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038
20415  * _import_array()
20416  * except Exception:
20417  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
20418  *
20419  * cdef inline int import_umath() except -1:
20420  */
20421  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1038, __pyx_L5_except_error)
20422  __Pyx_GOTREF(__pyx_t_8);
20423  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
20424  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20425  __PYX_ERR(3, 1038, __pyx_L5_except_error)
20426  }
20427  goto __pyx_L5_except_error;
20428  __pyx_L5_except_error:;
20429 
20430  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035
20431  * # Cython code.
20432  * cdef inline int import_array() except -1:
20433  * try: # <<<<<<<<<<<<<<
20434  * _import_array()
20435  * except Exception:
20436  */
20437  __Pyx_XGIVEREF(__pyx_t_1);
20438  __Pyx_XGIVEREF(__pyx_t_2);
20439  __Pyx_XGIVEREF(__pyx_t_3);
20440  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
20441  goto __pyx_L1_error;
20442  __pyx_L8_try_end:;
20443  }
20444 
20445  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034
20446  * # Versions of the import_* functions which are more suitable for
20447  * # Cython code.
20448  * cdef inline int import_array() except -1: # <<<<<<<<<<<<<<
20449  * try:
20450  * _import_array()
20451  */
20452 
20453  /* function exit code */
20454  __pyx_r = 0;
20455  goto __pyx_L0;
20456  __pyx_L1_error:;
20457  __Pyx_XDECREF(__pyx_t_5);
20458  __Pyx_XDECREF(__pyx_t_6);
20459  __Pyx_XDECREF(__pyx_t_7);
20460  __Pyx_XDECREF(__pyx_t_8);
20461  __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
20462  __pyx_r = -1;
20463  __pyx_L0:;
20464  __Pyx_RefNannyFinishContext();
20465  return __pyx_r;
20466 }
20467 
20468 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040
20469  * raise ImportError("numpy.core.multiarray failed to import")
20470  *
20471  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
20472  * try:
20473  * _import_umath()
20474  */
20475 
20476 static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) {
20477  int __pyx_r;
20478  __Pyx_RefNannyDeclarations
20479  PyObject *__pyx_t_1 = NULL;
20480  PyObject *__pyx_t_2 = NULL;
20481  PyObject *__pyx_t_3 = NULL;
20482  int __pyx_t_4;
20483  PyObject *__pyx_t_5 = NULL;
20484  PyObject *__pyx_t_6 = NULL;
20485  PyObject *__pyx_t_7 = NULL;
20486  PyObject *__pyx_t_8 = NULL;
20487  __Pyx_RefNannySetupContext("import_umath", 0);
20488 
20489  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
20490  *
20491  * cdef inline int import_umath() except -1:
20492  * try: # <<<<<<<<<<<<<<
20493  * _import_umath()
20494  * except Exception:
20495  */
20496  {
20497  __Pyx_PyThreadState_declare
20498  __Pyx_PyThreadState_assign
20499  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
20500  __Pyx_XGOTREF(__pyx_t_1);
20501  __Pyx_XGOTREF(__pyx_t_2);
20502  __Pyx_XGOTREF(__pyx_t_3);
20503  /*try:*/ {
20504 
20505  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1042
20506  * cdef inline int import_umath() except -1:
20507  * try:
20508  * _import_umath() # <<<<<<<<<<<<<<
20509  * except Exception:
20510  * raise ImportError("numpy.core.umath failed to import")
20511  */
20512  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1042, __pyx_L3_error)
20513 
20514  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
20515  *
20516  * cdef inline int import_umath() except -1:
20517  * try: # <<<<<<<<<<<<<<
20518  * _import_umath()
20519  * except Exception:
20520  */
20521  }
20522  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
20523  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20524  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20525  goto __pyx_L8_try_end;
20526  __pyx_L3_error:;
20527 
20528  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1043
20529  * try:
20530  * _import_umath()
20531  * except Exception: # <<<<<<<<<<<<<<
20532  * raise ImportError("numpy.core.umath failed to import")
20533  *
20534  */
20535  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
20536  if (__pyx_t_4) {
20537  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
20538  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1043, __pyx_L5_except_error)
20539  __Pyx_GOTREF(__pyx_t_5);
20540  __Pyx_GOTREF(__pyx_t_6);
20541  __Pyx_GOTREF(__pyx_t_7);
20542 
20543  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044
20544  * _import_umath()
20545  * except Exception:
20546  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
20547  *
20548  * cdef inline int import_ufunc() except -1:
20549  */
20550  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1044, __pyx_L5_except_error)
20551  __Pyx_GOTREF(__pyx_t_8);
20552  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
20553  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20554  __PYX_ERR(3, 1044, __pyx_L5_except_error)
20555  }
20556  goto __pyx_L5_except_error;
20557  __pyx_L5_except_error:;
20558 
20559  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041
20560  *
20561  * cdef inline int import_umath() except -1:
20562  * try: # <<<<<<<<<<<<<<
20563  * _import_umath()
20564  * except Exception:
20565  */
20566  __Pyx_XGIVEREF(__pyx_t_1);
20567  __Pyx_XGIVEREF(__pyx_t_2);
20568  __Pyx_XGIVEREF(__pyx_t_3);
20569  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
20570  goto __pyx_L1_error;
20571  __pyx_L8_try_end:;
20572  }
20573 
20574  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040
20575  * raise ImportError("numpy.core.multiarray failed to import")
20576  *
20577  * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<<
20578  * try:
20579  * _import_umath()
20580  */
20581 
20582  /* function exit code */
20583  __pyx_r = 0;
20584  goto __pyx_L0;
20585  __pyx_L1_error:;
20586  __Pyx_XDECREF(__pyx_t_5);
20587  __Pyx_XDECREF(__pyx_t_6);
20588  __Pyx_XDECREF(__pyx_t_7);
20589  __Pyx_XDECREF(__pyx_t_8);
20590  __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename);
20591  __pyx_r = -1;
20592  __pyx_L0:;
20593  __Pyx_RefNannyFinishContext();
20594  return __pyx_r;
20595 }
20596 
20597 /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
20598  * raise ImportError("numpy.core.umath failed to import")
20599  *
20600  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
20601  * try:
20602  * _import_umath()
20603  */
20604 
20605 static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) {
20606  int __pyx_r;
20607  __Pyx_RefNannyDeclarations
20608  PyObject *__pyx_t_1 = NULL;
20609  PyObject *__pyx_t_2 = NULL;
20610  PyObject *__pyx_t_3 = NULL;
20611  int __pyx_t_4;
20612  PyObject *__pyx_t_5 = NULL;
20613  PyObject *__pyx_t_6 = NULL;
20614  PyObject *__pyx_t_7 = NULL;
20615  PyObject *__pyx_t_8 = NULL;
20616  __Pyx_RefNannySetupContext("import_ufunc", 0);
20617 
20618  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
20619  *
20620  * cdef inline int import_ufunc() except -1:
20621  * try: # <<<<<<<<<<<<<<
20622  * _import_umath()
20623  * except Exception:
20624  */
20625  {
20626  __Pyx_PyThreadState_declare
20627  __Pyx_PyThreadState_assign
20628  __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
20629  __Pyx_XGOTREF(__pyx_t_1);
20630  __Pyx_XGOTREF(__pyx_t_2);
20631  __Pyx_XGOTREF(__pyx_t_3);
20632  /*try:*/ {
20633 
20634  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1048
20635  * cdef inline int import_ufunc() except -1:
20636  * try:
20637  * _import_umath() # <<<<<<<<<<<<<<
20638  * except Exception:
20639  * raise ImportError("numpy.core.umath failed to import")
20640  */
20641  __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1048, __pyx_L3_error)
20642 
20643  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
20644  *
20645  * cdef inline int import_ufunc() except -1:
20646  * try: # <<<<<<<<<<<<<<
20647  * _import_umath()
20648  * except Exception:
20649  */
20650  }
20651  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
20652  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
20653  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
20654  goto __pyx_L8_try_end;
20655  __pyx_L3_error:;
20656 
20657  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1049
20658  * try:
20659  * _import_umath()
20660  * except Exception: # <<<<<<<<<<<<<<
20661  * raise ImportError("numpy.core.umath failed to import")
20662  */
20663  __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
20664  if (__pyx_t_4) {
20665  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
20666  if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1049, __pyx_L5_except_error)
20667  __Pyx_GOTREF(__pyx_t_5);
20668  __Pyx_GOTREF(__pyx_t_6);
20669  __Pyx_GOTREF(__pyx_t_7);
20670 
20671  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1050
20672  * _import_umath()
20673  * except Exception:
20674  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
20675  */
20676  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1050, __pyx_L5_except_error)
20677  __Pyx_GOTREF(__pyx_t_8);
20678  __Pyx_Raise(__pyx_t_8, 0, 0, 0);
20679  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
20680  __PYX_ERR(3, 1050, __pyx_L5_except_error)
20681  }
20682  goto __pyx_L5_except_error;
20683  __pyx_L5_except_error:;
20684 
20685  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047
20686  *
20687  * cdef inline int import_ufunc() except -1:
20688  * try: # <<<<<<<<<<<<<<
20689  * _import_umath()
20690  * except Exception:
20691  */
20692  __Pyx_XGIVEREF(__pyx_t_1);
20693  __Pyx_XGIVEREF(__pyx_t_2);
20694  __Pyx_XGIVEREF(__pyx_t_3);
20695  __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
20696  goto __pyx_L1_error;
20697  __pyx_L8_try_end:;
20698  }
20699 
20700  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046
20701  * raise ImportError("numpy.core.umath failed to import")
20702  *
20703  * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<<
20704  * try:
20705  * _import_umath()
20706  */
20707 
20708  /* function exit code */
20709  __pyx_r = 0;
20710  goto __pyx_L0;
20711  __pyx_L1_error:;
20712  __Pyx_XDECREF(__pyx_t_5);
20713  __Pyx_XDECREF(__pyx_t_6);
20714  __Pyx_XDECREF(__pyx_t_7);
20715  __Pyx_XDECREF(__pyx_t_8);
20716  __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename);
20717  __pyx_r = -1;
20718  __pyx_L0:;
20719  __Pyx_RefNannyFinishContext();
20720  return __pyx_r;
20721 }
20722 
20723 /* "View.MemoryView":122
20724  * cdef bint dtype_is_object
20725  *
20726  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
20727  * mode="c", bint allocate_buffer=True):
20728  *
20729  */
20730 
20731 /* Python wrapper */
20732 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
20733 static int __pyx_array___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
20734  PyObject *__pyx_v_shape = 0;
20735  Py_ssize_t __pyx_v_itemsize;
20736  PyObject *__pyx_v_format = 0;
20737  PyObject *__pyx_v_mode = 0;
20738  int __pyx_v_allocate_buffer;
20739  int __pyx_r;
20740  __Pyx_RefNannyDeclarations
20741  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
20742  {
20743  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_shape,&__pyx_n_s_itemsize,&__pyx_n_s_format,&__pyx_n_s_mode,&__pyx_n_s_allocate_buffer,0};
20744  PyObject* values[5] = {0,0,0,0,0};
20745  values[3] = ((PyObject *)__pyx_n_s_c);
20746  if (unlikely(__pyx_kwds)) {
20747  Py_ssize_t kw_args;
20748  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
20749  switch (pos_args) {
20750  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
20751  CYTHON_FALLTHROUGH;
20752  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
20753  CYTHON_FALLTHROUGH;
20754  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20755  CYTHON_FALLTHROUGH;
20756  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20757  CYTHON_FALLTHROUGH;
20758  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20759  CYTHON_FALLTHROUGH;
20760  case 0: break;
20761  default: goto __pyx_L5_argtuple_error;
20762  }
20763  kw_args = PyDict_Size(__pyx_kwds);
20764  switch (pos_args) {
20765  case 0:
20766  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_shape)) != 0)) kw_args--;
20767  else goto __pyx_L5_argtuple_error;
20768  CYTHON_FALLTHROUGH;
20769  case 1:
20770  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_itemsize)) != 0)) kw_args--;
20771  else {
20772  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 1); __PYX_ERR(0, 122, __pyx_L3_error)
20773  }
20774  CYTHON_FALLTHROUGH;
20775  case 2:
20776  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--;
20777  else {
20778  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, 2); __PYX_ERR(0, 122, __pyx_L3_error)
20779  }
20780  CYTHON_FALLTHROUGH;
20781  case 3:
20782  if (kw_args > 0) {
20783  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mode);
20784  if (value) { values[3] = value; kw_args--; }
20785  }
20786  CYTHON_FALLTHROUGH;
20787  case 4:
20788  if (kw_args > 0) {
20789  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_allocate_buffer);
20790  if (value) { values[4] = value; kw_args--; }
20791  }
20792  }
20793  if (unlikely(kw_args > 0)) {
20794  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 122, __pyx_L3_error)
20795  }
20796  } else {
20797  switch (PyTuple_GET_SIZE(__pyx_args)) {
20798  case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
20799  CYTHON_FALLTHROUGH;
20800  case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
20801  CYTHON_FALLTHROUGH;
20802  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
20803  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
20804  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
20805  break;
20806  default: goto __pyx_L5_argtuple_error;
20807  }
20808  }
20809  __pyx_v_shape = ((PyObject*)values[0]);
20810  __pyx_v_itemsize = __Pyx_PyIndex_AsSsize_t(values[1]); if (unlikely((__pyx_v_itemsize == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L3_error)
20811  __pyx_v_format = values[2];
20812  __pyx_v_mode = values[3];
20813  if (values[4]) {
20814  __pyx_v_allocate_buffer = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_allocate_buffer == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 123, __pyx_L3_error)
20815  } else {
20816 
20817  /* "View.MemoryView":123
20818  *
20819  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None,
20820  * mode="c", bint allocate_buffer=True): # <<<<<<<<<<<<<<
20821  *
20822  * cdef int idx
20823  */
20824  __pyx_v_allocate_buffer = ((int)1);
20825  }
20826  }
20827  goto __pyx_L4_argument_unpacking_done;
20828  __pyx_L5_argtuple_error:;
20829  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 122, __pyx_L3_error)
20830  __pyx_L3_error:;
20831  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
20832  __Pyx_RefNannyFinishContext();
20833  return -1;
20834  __pyx_L4_argument_unpacking_done:;
20835  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_shape), (&PyTuple_Type), 1, "shape", 1))) __PYX_ERR(0, 122, __pyx_L1_error)
20836  if (unlikely(((PyObject *)__pyx_v_format) == Py_None)) {
20837  PyErr_Format(PyExc_TypeError, "Argument '%.200s' must not be None", "format"); __PYX_ERR(0, 122, __pyx_L1_error)
20838  }
20839  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(((struct __pyx_array_obj *)__pyx_v_self), __pyx_v_shape, __pyx_v_itemsize, __pyx_v_format, __pyx_v_mode, __pyx_v_allocate_buffer);
20840 
20841  /* "View.MemoryView":122
20842  * cdef bint dtype_is_object
20843  *
20844  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
20845  * mode="c", bint allocate_buffer=True):
20846  *
20847  */
20848 
20849  /* function exit code */
20850  goto __pyx_L0;
20851  __pyx_L1_error:;
20852  __pyx_r = -1;
20853  __pyx_L0:;
20854  __Pyx_RefNannyFinishContext();
20855  return __pyx_r;
20856 }
20857 
20858 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array___cinit__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, PyObject *__pyx_v_format, PyObject *__pyx_v_mode, int __pyx_v_allocate_buffer) {
20859  int __pyx_v_idx;
20860  Py_ssize_t __pyx_v_i;
20861  Py_ssize_t __pyx_v_dim;
20862  PyObject **__pyx_v_p;
20863  char __pyx_v_order;
20864  int __pyx_r;
20865  __Pyx_RefNannyDeclarations
20866  Py_ssize_t __pyx_t_1;
20867  int __pyx_t_2;
20868  PyObject *__pyx_t_3 = NULL;
20869  int __pyx_t_4;
20870  PyObject *__pyx_t_5 = NULL;
20871  PyObject *__pyx_t_6 = NULL;
20872  char *__pyx_t_7;
20873  int __pyx_t_8;
20874  Py_ssize_t __pyx_t_9;
20875  PyObject *__pyx_t_10 = NULL;
20876  Py_ssize_t __pyx_t_11;
20877  __Pyx_RefNannySetupContext("__cinit__", 0);
20878  __Pyx_INCREF(__pyx_v_format);
20879 
20880  /* "View.MemoryView":129
20881  * cdef PyObject **p
20882  *
20883  * self.ndim = <int> len(shape) # <<<<<<<<<<<<<<
20884  * self.itemsize = itemsize
20885  *
20886  */
20887  if (unlikely(__pyx_v_shape == Py_None)) {
20888  PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
20889  __PYX_ERR(0, 129, __pyx_L1_error)
20890  }
20891  __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_shape); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 129, __pyx_L1_error)
20892  __pyx_v_self->ndim = ((int)__pyx_t_1);
20893 
20894  /* "View.MemoryView":130
20895  *
20896  * self.ndim = <int> len(shape)
20897  * self.itemsize = itemsize # <<<<<<<<<<<<<<
20898  *
20899  * if not self.ndim:
20900  */
20901  __pyx_v_self->itemsize = __pyx_v_itemsize;
20902 
20903  /* "View.MemoryView":132
20904  * self.itemsize = itemsize
20905  *
20906  * if not self.ndim: # <<<<<<<<<<<<<<
20907  * raise ValueError("Empty shape tuple for cython.array")
20908  *
20909  */
20910  __pyx_t_2 = ((!(__pyx_v_self->ndim != 0)) != 0);
20911  if (unlikely(__pyx_t_2)) {
20912 
20913  /* "View.MemoryView":133
20914  *
20915  * if not self.ndim:
20916  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
20917  *
20918  * if itemsize <= 0:
20919  */
20920  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 133, __pyx_L1_error)
20921  __Pyx_GOTREF(__pyx_t_3);
20922  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
20923  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20924  __PYX_ERR(0, 133, __pyx_L1_error)
20925 
20926  /* "View.MemoryView":132
20927  * self.itemsize = itemsize
20928  *
20929  * if not self.ndim: # <<<<<<<<<<<<<<
20930  * raise ValueError("Empty shape tuple for cython.array")
20931  *
20932  */
20933  }
20934 
20935  /* "View.MemoryView":135
20936  * raise ValueError("Empty shape tuple for cython.array")
20937  *
20938  * if itemsize <= 0: # <<<<<<<<<<<<<<
20939  * raise ValueError("itemsize <= 0 for cython.array")
20940  *
20941  */
20942  __pyx_t_2 = ((__pyx_v_itemsize <= 0) != 0);
20943  if (unlikely(__pyx_t_2)) {
20944 
20945  /* "View.MemoryView":136
20946  *
20947  * if itemsize <= 0:
20948  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
20949  *
20950  * if not isinstance(format, bytes):
20951  */
20952  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
20953  __Pyx_GOTREF(__pyx_t_3);
20954  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
20955  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
20956  __PYX_ERR(0, 136, __pyx_L1_error)
20957 
20958  /* "View.MemoryView":135
20959  * raise ValueError("Empty shape tuple for cython.array")
20960  *
20961  * if itemsize <= 0: # <<<<<<<<<<<<<<
20962  * raise ValueError("itemsize <= 0 for cython.array")
20963  *
20964  */
20965  }
20966 
20967  /* "View.MemoryView":138
20968  * raise ValueError("itemsize <= 0 for cython.array")
20969  *
20970  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
20971  * format = format.encode('ASCII')
20972  * self._format = format # keep a reference to the byte string
20973  */
20974  __pyx_t_2 = PyBytes_Check(__pyx_v_format);
20975  __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0);
20976  if (__pyx_t_4) {
20977 
20978  /* "View.MemoryView":139
20979  *
20980  * if not isinstance(format, bytes):
20981  * format = format.encode('ASCII') # <<<<<<<<<<<<<<
20982  * self._format = format # keep a reference to the byte string
20983  * self.format = self._format
20984  */
20985  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_format, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 139, __pyx_L1_error)
20986  __Pyx_GOTREF(__pyx_t_5);
20987  __pyx_t_6 = NULL;
20988  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
20989  __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
20990  if (likely(__pyx_t_6)) {
20991  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
20992  __Pyx_INCREF(__pyx_t_6);
20993  __Pyx_INCREF(function);
20994  __Pyx_DECREF_SET(__pyx_t_5, function);
20995  }
20996  }
20997  __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_s_ASCII) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_s_ASCII);
20998  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
20999  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
21000  __Pyx_GOTREF(__pyx_t_3);
21001  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21002  __Pyx_DECREF_SET(__pyx_v_format, __pyx_t_3);
21003  __pyx_t_3 = 0;
21004 
21005  /* "View.MemoryView":138
21006  * raise ValueError("itemsize <= 0 for cython.array")
21007  *
21008  * if not isinstance(format, bytes): # <<<<<<<<<<<<<<
21009  * format = format.encode('ASCII')
21010  * self._format = format # keep a reference to the byte string
21011  */
21012  }
21013 
21014  /* "View.MemoryView":140
21015  * if not isinstance(format, bytes):
21016  * format = format.encode('ASCII')
21017  * self._format = format # keep a reference to the byte string # <<<<<<<<<<<<<<
21018  * self.format = self._format
21019  *
21020  */
21021  if (!(likely(PyBytes_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(0, 140, __pyx_L1_error)
21022  __pyx_t_3 = __pyx_v_format;
21023  __Pyx_INCREF(__pyx_t_3);
21024  __Pyx_GIVEREF(__pyx_t_3);
21025  __Pyx_GOTREF(__pyx_v_self->_format);
21026  __Pyx_DECREF(__pyx_v_self->_format);
21027  __pyx_v_self->_format = ((PyObject*)__pyx_t_3);
21028  __pyx_t_3 = 0;
21029 
21030  /* "View.MemoryView":141
21031  * format = format.encode('ASCII')
21032  * self._format = format # keep a reference to the byte string
21033  * self.format = self._format # <<<<<<<<<<<<<<
21034  *
21035  *
21036  */
21037  if (unlikely(__pyx_v_self->_format == Py_None)) {
21038  PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
21039  __PYX_ERR(0, 141, __pyx_L1_error)
21040  }
21041  __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_format); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 141, __pyx_L1_error)
21042  __pyx_v_self->format = __pyx_t_7;
21043 
21044  /* "View.MemoryView":144
21045  *
21046  *
21047  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) # <<<<<<<<<<<<<<
21048  * self._strides = self._shape + self.ndim
21049  *
21050  */
21051  __pyx_v_self->_shape = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * __pyx_v_self->ndim) * 2)));
21052 
21053  /* "View.MemoryView":145
21054  *
21055  * self._shape = <Py_ssize_t *> PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2)
21056  * self._strides = self._shape + self.ndim # <<<<<<<<<<<<<<
21057  *
21058  * if not self._shape:
21059  */
21060  __pyx_v_self->_strides = (__pyx_v_self->_shape + __pyx_v_self->ndim);
21061 
21062  /* "View.MemoryView":147
21063  * self._strides = self._shape + self.ndim
21064  *
21065  * if not self._shape: # <<<<<<<<<<<<<<
21066  * raise MemoryError("unable to allocate shape and strides.")
21067  *
21068  */
21069  __pyx_t_4 = ((!(__pyx_v_self->_shape != 0)) != 0);
21070  if (unlikely(__pyx_t_4)) {
21071 
21072  /* "View.MemoryView":148
21073  *
21074  * if not self._shape:
21075  * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
21076  *
21077  *
21078  */
21079  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
21080  __Pyx_GOTREF(__pyx_t_3);
21081  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
21082  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21083  __PYX_ERR(0, 148, __pyx_L1_error)
21084 
21085  /* "View.MemoryView":147
21086  * self._strides = self._shape + self.ndim
21087  *
21088  * if not self._shape: # <<<<<<<<<<<<<<
21089  * raise MemoryError("unable to allocate shape and strides.")
21090  *
21091  */
21092  }
21093 
21094  /* "View.MemoryView":151
21095  *
21096  *
21097  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
21098  * if dim <= 0:
21099  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
21100  */
21101  __pyx_t_8 = 0;
21102  __pyx_t_3 = __pyx_v_shape; __Pyx_INCREF(__pyx_t_3); __pyx_t_1 = 0;
21103  for (;;) {
21104  if (__pyx_t_1 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
21105  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
21106  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_1); __Pyx_INCREF(__pyx_t_5); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 151, __pyx_L1_error)
21107  #else
21108  __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 151, __pyx_L1_error)
21109  __Pyx_GOTREF(__pyx_t_5);
21110  #endif
21111  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L1_error)
21112  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
21113  __pyx_v_dim = __pyx_t_9;
21114  __pyx_v_idx = __pyx_t_8;
21115  __pyx_t_8 = (__pyx_t_8 + 1);
21116 
21117  /* "View.MemoryView":152
21118  *
21119  * for idx, dim in enumerate(shape):
21120  * if dim <= 0: # <<<<<<<<<<<<<<
21121  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
21122  * self._shape[idx] = dim
21123  */
21124  __pyx_t_4 = ((__pyx_v_dim <= 0) != 0);
21125  if (unlikely(__pyx_t_4)) {
21126 
21127  /* "View.MemoryView":153
21128  * for idx, dim in enumerate(shape):
21129  * if dim <= 0:
21130  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) # <<<<<<<<<<<<<<
21131  * self._shape[idx] = dim
21132  *
21133  */
21134  __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_idx); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 153, __pyx_L1_error)
21135  __Pyx_GOTREF(__pyx_t_5);
21136  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
21137  __Pyx_GOTREF(__pyx_t_6);
21138  __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 153, __pyx_L1_error)
21139  __Pyx_GOTREF(__pyx_t_10);
21140  __Pyx_GIVEREF(__pyx_t_5);
21141  PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5);
21142  __Pyx_GIVEREF(__pyx_t_6);
21143  PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_6);
21144  __pyx_t_5 = 0;
21145  __pyx_t_6 = 0;
21146  __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 153, __pyx_L1_error)
21147  __Pyx_GOTREF(__pyx_t_6);
21148  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21149  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 153, __pyx_L1_error)
21150  __Pyx_GOTREF(__pyx_t_10);
21151  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
21152  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
21153  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21154  __PYX_ERR(0, 153, __pyx_L1_error)
21155 
21156  /* "View.MemoryView":152
21157  *
21158  * for idx, dim in enumerate(shape):
21159  * if dim <= 0: # <<<<<<<<<<<<<<
21160  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
21161  * self._shape[idx] = dim
21162  */
21163  }
21164 
21165  /* "View.MemoryView":154
21166  * if dim <= 0:
21167  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
21168  * self._shape[idx] = dim # <<<<<<<<<<<<<<
21169  *
21170  * cdef char order
21171  */
21172  (__pyx_v_self->_shape[__pyx_v_idx]) = __pyx_v_dim;
21173 
21174  /* "View.MemoryView":151
21175  *
21176  *
21177  * for idx, dim in enumerate(shape): # <<<<<<<<<<<<<<
21178  * if dim <= 0:
21179  * raise ValueError("Invalid shape in axis %d: %d." % (idx, dim))
21180  */
21181  }
21182  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21183 
21184  /* "View.MemoryView":157
21185  *
21186  * cdef char order
21187  * if mode == 'fortran': # <<<<<<<<<<<<<<
21188  * order = b'F'
21189  * self.mode = u'fortran'
21190  */
21191  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_fortran, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 157, __pyx_L1_error)
21192  if (__pyx_t_4) {
21193 
21194  /* "View.MemoryView":158
21195  * cdef char order
21196  * if mode == 'fortran':
21197  * order = b'F' # <<<<<<<<<<<<<<
21198  * self.mode = u'fortran'
21199  * elif mode == 'c':
21200  */
21201  __pyx_v_order = 'F';
21202 
21203  /* "View.MemoryView":159
21204  * if mode == 'fortran':
21205  * order = b'F'
21206  * self.mode = u'fortran' # <<<<<<<<<<<<<<
21207  * elif mode == 'c':
21208  * order = b'C'
21209  */
21210  __Pyx_INCREF(__pyx_n_u_fortran);
21211  __Pyx_GIVEREF(__pyx_n_u_fortran);
21212  __Pyx_GOTREF(__pyx_v_self->mode);
21213  __Pyx_DECREF(__pyx_v_self->mode);
21214  __pyx_v_self->mode = __pyx_n_u_fortran;
21215 
21216  /* "View.MemoryView":157
21217  *
21218  * cdef char order
21219  * if mode == 'fortran': # <<<<<<<<<<<<<<
21220  * order = b'F'
21221  * self.mode = u'fortran'
21222  */
21223  goto __pyx_L10;
21224  }
21225 
21226  /* "View.MemoryView":160
21227  * order = b'F'
21228  * self.mode = u'fortran'
21229  * elif mode == 'c': # <<<<<<<<<<<<<<
21230  * order = b'C'
21231  * self.mode = u'c'
21232  */
21233  __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_mode, __pyx_n_s_c, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 160, __pyx_L1_error)
21234  if (likely(__pyx_t_4)) {
21235 
21236  /* "View.MemoryView":161
21237  * self.mode = u'fortran'
21238  * elif mode == 'c':
21239  * order = b'C' # <<<<<<<<<<<<<<
21240  * self.mode = u'c'
21241  * else:
21242  */
21243  __pyx_v_order = 'C';
21244 
21245  /* "View.MemoryView":162
21246  * elif mode == 'c':
21247  * order = b'C'
21248  * self.mode = u'c' # <<<<<<<<<<<<<<
21249  * else:
21250  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
21251  */
21252  __Pyx_INCREF(__pyx_n_u_c);
21253  __Pyx_GIVEREF(__pyx_n_u_c);
21254  __Pyx_GOTREF(__pyx_v_self->mode);
21255  __Pyx_DECREF(__pyx_v_self->mode);
21256  __pyx_v_self->mode = __pyx_n_u_c;
21257 
21258  /* "View.MemoryView":160
21259  * order = b'F'
21260  * self.mode = u'fortran'
21261  * elif mode == 'c': # <<<<<<<<<<<<<<
21262  * order = b'C'
21263  * self.mode = u'c'
21264  */
21265  goto __pyx_L10;
21266  }
21267 
21268  /* "View.MemoryView":164
21269  * self.mode = u'c'
21270  * else:
21271  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) # <<<<<<<<<<<<<<
21272  *
21273  * self.len = fill_contig_strides_array(self._shape, self._strides,
21274  */
21275  /*else*/ {
21276  __pyx_t_3 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_v_mode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error)
21277  __Pyx_GOTREF(__pyx_t_3);
21278  __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 164, __pyx_L1_error)
21279  __Pyx_GOTREF(__pyx_t_10);
21280  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21281  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
21282  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21283  __PYX_ERR(0, 164, __pyx_L1_error)
21284  }
21285  __pyx_L10:;
21286 
21287  /* "View.MemoryView":166
21288  * raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode)
21289  *
21290  * self.len = fill_contig_strides_array(self._shape, self._strides, # <<<<<<<<<<<<<<
21291  * itemsize, self.ndim, order)
21292  *
21293  */
21294  __pyx_v_self->len = __pyx_fill_contig_strides_array(__pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_itemsize, __pyx_v_self->ndim, __pyx_v_order);
21295 
21296  /* "View.MemoryView":169
21297  * itemsize, self.ndim, order)
21298  *
21299  * self.free_data = allocate_buffer # <<<<<<<<<<<<<<
21300  * self.dtype_is_object = format == b'O'
21301  * if allocate_buffer:
21302  */
21303  __pyx_v_self->free_data = __pyx_v_allocate_buffer;
21304 
21305  /* "View.MemoryView":170
21306  *
21307  * self.free_data = allocate_buffer
21308  * self.dtype_is_object = format == b'O' # <<<<<<<<<<<<<<
21309  * if allocate_buffer:
21310  *
21311  */
21312  __pyx_t_10 = PyObject_RichCompare(__pyx_v_format, __pyx_n_b_O, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 170, __pyx_L1_error)
21313  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error)
21314  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21315  __pyx_v_self->dtype_is_object = __pyx_t_4;
21316 
21317  /* "View.MemoryView":171
21318  * self.free_data = allocate_buffer
21319  * self.dtype_is_object = format == b'O'
21320  * if allocate_buffer: # <<<<<<<<<<<<<<
21321  *
21322  *
21323  */
21324  __pyx_t_4 = (__pyx_v_allocate_buffer != 0);
21325  if (__pyx_t_4) {
21326 
21327  /* "View.MemoryView":174
21328  *
21329  *
21330  * self.data = <char *>malloc(self.len) # <<<<<<<<<<<<<<
21331  * if not self.data:
21332  * raise MemoryError("unable to allocate array data.")
21333  */
21334  __pyx_v_self->data = ((char *)malloc(__pyx_v_self->len));
21335 
21336  /* "View.MemoryView":175
21337  *
21338  * self.data = <char *>malloc(self.len)
21339  * if not self.data: # <<<<<<<<<<<<<<
21340  * raise MemoryError("unable to allocate array data.")
21341  *
21342  */
21343  __pyx_t_4 = ((!(__pyx_v_self->data != 0)) != 0);
21344  if (unlikely(__pyx_t_4)) {
21345 
21346  /* "View.MemoryView":176
21347  * self.data = <char *>malloc(self.len)
21348  * if not self.data:
21349  * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
21350  *
21351  * if self.dtype_is_object:
21352  */
21353  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_MemoryError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 176, __pyx_L1_error)
21354  __Pyx_GOTREF(__pyx_t_10);
21355  __Pyx_Raise(__pyx_t_10, 0, 0, 0);
21356  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
21357  __PYX_ERR(0, 176, __pyx_L1_error)
21358 
21359  /* "View.MemoryView":175
21360  *
21361  * self.data = <char *>malloc(self.len)
21362  * if not self.data: # <<<<<<<<<<<<<<
21363  * raise MemoryError("unable to allocate array data.")
21364  *
21365  */
21366  }
21367 
21368  /* "View.MemoryView":178
21369  * raise MemoryError("unable to allocate array data.")
21370  *
21371  * if self.dtype_is_object: # <<<<<<<<<<<<<<
21372  * p = <PyObject **> self.data
21373  * for i in range(self.len / itemsize):
21374  */
21375  __pyx_t_4 = (__pyx_v_self->dtype_is_object != 0);
21376  if (__pyx_t_4) {
21377 
21378  /* "View.MemoryView":179
21379  *
21380  * if self.dtype_is_object:
21381  * p = <PyObject **> self.data # <<<<<<<<<<<<<<
21382  * for i in range(self.len / itemsize):
21383  * p[i] = Py_None
21384  */
21385  __pyx_v_p = ((PyObject **)__pyx_v_self->data);
21386 
21387  /* "View.MemoryView":180
21388  * if self.dtype_is_object:
21389  * p = <PyObject **> self.data
21390  * for i in range(self.len / itemsize): # <<<<<<<<<<<<<<
21391  * p[i] = Py_None
21392  * Py_INCREF(Py_None)
21393  */
21394  if (unlikely(__pyx_v_itemsize == 0)) {
21395  PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
21396  __PYX_ERR(0, 180, __pyx_L1_error)
21397  }
21398  else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_self->len))) {
21399  PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
21400  __PYX_ERR(0, 180, __pyx_L1_error)
21401  }
21402  __pyx_t_1 = __Pyx_div_Py_ssize_t(__pyx_v_self->len, __pyx_v_itemsize);
21403  __pyx_t_9 = __pyx_t_1;
21404  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_9; __pyx_t_11+=1) {
21405  __pyx_v_i = __pyx_t_11;
21406 
21407  /* "View.MemoryView":181
21408  * p = <PyObject **> self.data
21409  * for i in range(self.len / itemsize):
21410  * p[i] = Py_None # <<<<<<<<<<<<<<
21411  * Py_INCREF(Py_None)
21412  *
21413  */
21414  (__pyx_v_p[__pyx_v_i]) = Py_None;
21415 
21416  /* "View.MemoryView":182
21417  * for i in range(self.len / itemsize):
21418  * p[i] = Py_None
21419  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
21420  *
21421  * @cname('getbuffer')
21422  */
21423  Py_INCREF(Py_None);
21424  }
21425 
21426  /* "View.MemoryView":178
21427  * raise MemoryError("unable to allocate array data.")
21428  *
21429  * if self.dtype_is_object: # <<<<<<<<<<<<<<
21430  * p = <PyObject **> self.data
21431  * for i in range(self.len / itemsize):
21432  */
21433  }
21434 
21435  /* "View.MemoryView":171
21436  * self.free_data = allocate_buffer
21437  * self.dtype_is_object = format == b'O'
21438  * if allocate_buffer: # <<<<<<<<<<<<<<
21439  *
21440  *
21441  */
21442  }
21443 
21444  /* "View.MemoryView":122
21445  * cdef bint dtype_is_object
21446  *
21447  * def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, # <<<<<<<<<<<<<<
21448  * mode="c", bint allocate_buffer=True):
21449  *
21450  */
21451 
21452  /* function exit code */
21453  __pyx_r = 0;
21454  goto __pyx_L0;
21455  __pyx_L1_error:;
21456  __Pyx_XDECREF(__pyx_t_3);
21457  __Pyx_XDECREF(__pyx_t_5);
21458  __Pyx_XDECREF(__pyx_t_6);
21459  __Pyx_XDECREF(__pyx_t_10);
21460  __Pyx_AddTraceback("View.MemoryView.array.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21461  __pyx_r = -1;
21462  __pyx_L0:;
21463  __Pyx_XDECREF(__pyx_v_format);
21464  __Pyx_RefNannyFinishContext();
21465  return __pyx_r;
21466 }
21467 
21468 /* "View.MemoryView":185
21469  *
21470  * @cname('getbuffer')
21471  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
21472  * cdef int bufmode = -1
21473  * if self.mode == u"c":
21474  */
21475 
21476 /* Python wrapper */
21477 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
21478 static CYTHON_UNUSED int __pyx_array_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
21479  int __pyx_r;
21480  __Pyx_RefNannyDeclarations
21481  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
21482  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(((struct __pyx_array_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
21483 
21484  /* function exit code */
21485  __Pyx_RefNannyFinishContext();
21486  return __pyx_r;
21487 }
21488 
21489 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_2__getbuffer__(struct __pyx_array_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
21490  int __pyx_v_bufmode;
21491  int __pyx_r;
21492  __Pyx_RefNannyDeclarations
21493  int __pyx_t_1;
21494  int __pyx_t_2;
21495  PyObject *__pyx_t_3 = NULL;
21496  char *__pyx_t_4;
21497  Py_ssize_t __pyx_t_5;
21498  int __pyx_t_6;
21499  Py_ssize_t *__pyx_t_7;
21500  if (__pyx_v_info == NULL) {
21501  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
21502  return -1;
21503  }
21504  __Pyx_RefNannySetupContext("__getbuffer__", 0);
21505  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
21506  __Pyx_GIVEREF(__pyx_v_info->obj);
21507 
21508  /* "View.MemoryView":186
21509  * @cname('getbuffer')
21510  * def __getbuffer__(self, Py_buffer *info, int flags):
21511  * cdef int bufmode = -1 # <<<<<<<<<<<<<<
21512  * if self.mode == u"c":
21513  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21514  */
21515  __pyx_v_bufmode = -1;
21516 
21517  /* "View.MemoryView":187
21518  * def __getbuffer__(self, Py_buffer *info, int flags):
21519  * cdef int bufmode = -1
21520  * if self.mode == u"c": # <<<<<<<<<<<<<<
21521  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21522  * elif self.mode == u"fortran":
21523  */
21524  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_c, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 187, __pyx_L1_error)
21525  __pyx_t_2 = (__pyx_t_1 != 0);
21526  if (__pyx_t_2) {
21527 
21528  /* "View.MemoryView":188
21529  * cdef int bufmode = -1
21530  * if self.mode == u"c":
21531  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
21532  * elif self.mode == u"fortran":
21533  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21534  */
21535  __pyx_v_bufmode = (PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
21536 
21537  /* "View.MemoryView":187
21538  * def __getbuffer__(self, Py_buffer *info, int flags):
21539  * cdef int bufmode = -1
21540  * if self.mode == u"c": # <<<<<<<<<<<<<<
21541  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21542  * elif self.mode == u"fortran":
21543  */
21544  goto __pyx_L3;
21545  }
21546 
21547  /* "View.MemoryView":189
21548  * if self.mode == u"c":
21549  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21550  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
21551  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21552  * if not (flags & bufmode):
21553  */
21554  __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->mode, __pyx_n_u_fortran, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 189, __pyx_L1_error)
21555  __pyx_t_1 = (__pyx_t_2 != 0);
21556  if (__pyx_t_1) {
21557 
21558  /* "View.MemoryView":190
21559  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21560  * elif self.mode == u"fortran":
21561  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS # <<<<<<<<<<<<<<
21562  * if not (flags & bufmode):
21563  * raise ValueError("Can only create a buffer that is contiguous in memory.")
21564  */
21565  __pyx_v_bufmode = (PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS);
21566 
21567  /* "View.MemoryView":189
21568  * if self.mode == u"c":
21569  * bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21570  * elif self.mode == u"fortran": # <<<<<<<<<<<<<<
21571  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21572  * if not (flags & bufmode):
21573  */
21574  }
21575  __pyx_L3:;
21576 
21577  /* "View.MemoryView":191
21578  * elif self.mode == u"fortran":
21579  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21580  * if not (flags & bufmode): # <<<<<<<<<<<<<<
21581  * raise ValueError("Can only create a buffer that is contiguous in memory.")
21582  * info.buf = self.data
21583  */
21584  __pyx_t_1 = ((!((__pyx_v_flags & __pyx_v_bufmode) != 0)) != 0);
21585  if (unlikely(__pyx_t_1)) {
21586 
21587  /* "View.MemoryView":192
21588  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21589  * if not (flags & bufmode):
21590  * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
21591  * info.buf = self.data
21592  * info.len = self.len
21593  */
21594  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
21595  __Pyx_GOTREF(__pyx_t_3);
21596  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
21597  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
21598  __PYX_ERR(0, 192, __pyx_L1_error)
21599 
21600  /* "View.MemoryView":191
21601  * elif self.mode == u"fortran":
21602  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
21603  * if not (flags & bufmode): # <<<<<<<<<<<<<<
21604  * raise ValueError("Can only create a buffer that is contiguous in memory.")
21605  * info.buf = self.data
21606  */
21607  }
21608 
21609  /* "View.MemoryView":193
21610  * if not (flags & bufmode):
21611  * raise ValueError("Can only create a buffer that is contiguous in memory.")
21612  * info.buf = self.data # <<<<<<<<<<<<<<
21613  * info.len = self.len
21614  * info.ndim = self.ndim
21615  */
21616  __pyx_t_4 = __pyx_v_self->data;
21617  __pyx_v_info->buf = __pyx_t_4;
21618 
21619  /* "View.MemoryView":194
21620  * raise ValueError("Can only create a buffer that is contiguous in memory.")
21621  * info.buf = self.data
21622  * info.len = self.len # <<<<<<<<<<<<<<
21623  * info.ndim = self.ndim
21624  * info.shape = self._shape
21625  */
21626  __pyx_t_5 = __pyx_v_self->len;
21627  __pyx_v_info->len = __pyx_t_5;
21628 
21629  /* "View.MemoryView":195
21630  * info.buf = self.data
21631  * info.len = self.len
21632  * info.ndim = self.ndim # <<<<<<<<<<<<<<
21633  * info.shape = self._shape
21634  * info.strides = self._strides
21635  */
21636  __pyx_t_6 = __pyx_v_self->ndim;
21637  __pyx_v_info->ndim = __pyx_t_6;
21638 
21639  /* "View.MemoryView":196
21640  * info.len = self.len
21641  * info.ndim = self.ndim
21642  * info.shape = self._shape # <<<<<<<<<<<<<<
21643  * info.strides = self._strides
21644  * info.suboffsets = NULL
21645  */
21646  __pyx_t_7 = __pyx_v_self->_shape;
21647  __pyx_v_info->shape = __pyx_t_7;
21648 
21649  /* "View.MemoryView":197
21650  * info.ndim = self.ndim
21651  * info.shape = self._shape
21652  * info.strides = self._strides # <<<<<<<<<<<<<<
21653  * info.suboffsets = NULL
21654  * info.itemsize = self.itemsize
21655  */
21656  __pyx_t_7 = __pyx_v_self->_strides;
21657  __pyx_v_info->strides = __pyx_t_7;
21658 
21659  /* "View.MemoryView":198
21660  * info.shape = self._shape
21661  * info.strides = self._strides
21662  * info.suboffsets = NULL # <<<<<<<<<<<<<<
21663  * info.itemsize = self.itemsize
21664  * info.readonly = 0
21665  */
21666  __pyx_v_info->suboffsets = NULL;
21667 
21668  /* "View.MemoryView":199
21669  * info.strides = self._strides
21670  * info.suboffsets = NULL
21671  * info.itemsize = self.itemsize # <<<<<<<<<<<<<<
21672  * info.readonly = 0
21673  *
21674  */
21675  __pyx_t_5 = __pyx_v_self->itemsize;
21676  __pyx_v_info->itemsize = __pyx_t_5;
21677 
21678  /* "View.MemoryView":200
21679  * info.suboffsets = NULL
21680  * info.itemsize = self.itemsize
21681  * info.readonly = 0 # <<<<<<<<<<<<<<
21682  *
21683  * if flags & PyBUF_FORMAT:
21684  */
21685  __pyx_v_info->readonly = 0;
21686 
21687  /* "View.MemoryView":202
21688  * info.readonly = 0
21689  *
21690  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
21691  * info.format = self.format
21692  * else:
21693  */
21694  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
21695  if (__pyx_t_1) {
21696 
21697  /* "View.MemoryView":203
21698  *
21699  * if flags & PyBUF_FORMAT:
21700  * info.format = self.format # <<<<<<<<<<<<<<
21701  * else:
21702  * info.format = NULL
21703  */
21704  __pyx_t_4 = __pyx_v_self->format;
21705  __pyx_v_info->format = __pyx_t_4;
21706 
21707  /* "View.MemoryView":202
21708  * info.readonly = 0
21709  *
21710  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
21711  * info.format = self.format
21712  * else:
21713  */
21714  goto __pyx_L5;
21715  }
21716 
21717  /* "View.MemoryView":205
21718  * info.format = self.format
21719  * else:
21720  * info.format = NULL # <<<<<<<<<<<<<<
21721  *
21722  * info.obj = self
21723  */
21724  /*else*/ {
21725  __pyx_v_info->format = NULL;
21726  }
21727  __pyx_L5:;
21728 
21729  /* "View.MemoryView":207
21730  * info.format = NULL
21731  *
21732  * info.obj = self # <<<<<<<<<<<<<<
21733  *
21734  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
21735  */
21736  __Pyx_INCREF(((PyObject *)__pyx_v_self));
21737  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
21738  __Pyx_GOTREF(__pyx_v_info->obj);
21739  __Pyx_DECREF(__pyx_v_info->obj);
21740  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
21741 
21742  /* "View.MemoryView":185
21743  *
21744  * @cname('getbuffer')
21745  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
21746  * cdef int bufmode = -1
21747  * if self.mode == u"c":
21748  */
21749 
21750  /* function exit code */
21751  __pyx_r = 0;
21752  goto __pyx_L0;
21753  __pyx_L1_error:;
21754  __Pyx_XDECREF(__pyx_t_3);
21755  __Pyx_AddTraceback("View.MemoryView.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21756  __pyx_r = -1;
21757  if (__pyx_v_info->obj != NULL) {
21758  __Pyx_GOTREF(__pyx_v_info->obj);
21759  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
21760  }
21761  goto __pyx_L2;
21762  __pyx_L0:;
21763  if (__pyx_v_info->obj == Py_None) {
21764  __Pyx_GOTREF(__pyx_v_info->obj);
21765  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
21766  }
21767  __pyx_L2:;
21768  __Pyx_RefNannyFinishContext();
21769  return __pyx_r;
21770 }
21771 
21772 /* "View.MemoryView":211
21773  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
21774  *
21775  * def __dealloc__(array self): # <<<<<<<<<<<<<<
21776  * if self.callback_free_data != NULL:
21777  * self.callback_free_data(self.data)
21778  */
21779 
21780 /* Python wrapper */
21781 static void __pyx_array___dealloc__(PyObject *__pyx_v_self); /*proto*/
21782 static void __pyx_array___dealloc__(PyObject *__pyx_v_self) {
21783  __Pyx_RefNannyDeclarations
21784  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
21785  __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(((struct __pyx_array_obj *)__pyx_v_self));
21786 
21787  /* function exit code */
21788  __Pyx_RefNannyFinishContext();
21789 }
21790 
21791 static void __pyx_array___pyx_pf_15View_dot_MemoryView_5array_4__dealloc__(struct __pyx_array_obj *__pyx_v_self) {
21792  __Pyx_RefNannyDeclarations
21793  int __pyx_t_1;
21794  __Pyx_RefNannySetupContext("__dealloc__", 0);
21795 
21796  /* "View.MemoryView":212
21797  *
21798  * def __dealloc__(array self):
21799  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
21800  * self.callback_free_data(self.data)
21801  * elif self.free_data:
21802  */
21803  __pyx_t_1 = ((__pyx_v_self->callback_free_data != NULL) != 0);
21804  if (__pyx_t_1) {
21805 
21806  /* "View.MemoryView":213
21807  * def __dealloc__(array self):
21808  * if self.callback_free_data != NULL:
21809  * self.callback_free_data(self.data) # <<<<<<<<<<<<<<
21810  * elif self.free_data:
21811  * if self.dtype_is_object:
21812  */
21813  __pyx_v_self->callback_free_data(__pyx_v_self->data);
21814 
21815  /* "View.MemoryView":212
21816  *
21817  * def __dealloc__(array self):
21818  * if self.callback_free_data != NULL: # <<<<<<<<<<<<<<
21819  * self.callback_free_data(self.data)
21820  * elif self.free_data:
21821  */
21822  goto __pyx_L3;
21823  }
21824 
21825  /* "View.MemoryView":214
21826  * if self.callback_free_data != NULL:
21827  * self.callback_free_data(self.data)
21828  * elif self.free_data: # <<<<<<<<<<<<<<
21829  * if self.dtype_is_object:
21830  * refcount_objects_in_slice(self.data, self._shape,
21831  */
21832  __pyx_t_1 = (__pyx_v_self->free_data != 0);
21833  if (__pyx_t_1) {
21834 
21835  /* "View.MemoryView":215
21836  * self.callback_free_data(self.data)
21837  * elif self.free_data:
21838  * if self.dtype_is_object: # <<<<<<<<<<<<<<
21839  * refcount_objects_in_slice(self.data, self._shape,
21840  * self._strides, self.ndim, False)
21841  */
21842  __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
21843  if (__pyx_t_1) {
21844 
21845  /* "View.MemoryView":216
21846  * elif self.free_data:
21847  * if self.dtype_is_object:
21848  * refcount_objects_in_slice(self.data, self._shape, # <<<<<<<<<<<<<<
21849  * self._strides, self.ndim, False)
21850  * free(self.data)
21851  */
21852  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_self->data, __pyx_v_self->_shape, __pyx_v_self->_strides, __pyx_v_self->ndim, 0);
21853 
21854  /* "View.MemoryView":215
21855  * self.callback_free_data(self.data)
21856  * elif self.free_data:
21857  * if self.dtype_is_object: # <<<<<<<<<<<<<<
21858  * refcount_objects_in_slice(self.data, self._shape,
21859  * self._strides, self.ndim, False)
21860  */
21861  }
21862 
21863  /* "View.MemoryView":218
21864  * refcount_objects_in_slice(self.data, self._shape,
21865  * self._strides, self.ndim, False)
21866  * free(self.data) # <<<<<<<<<<<<<<
21867  * PyObject_Free(self._shape)
21868  *
21869  */
21870  free(__pyx_v_self->data);
21871 
21872  /* "View.MemoryView":214
21873  * if self.callback_free_data != NULL:
21874  * self.callback_free_data(self.data)
21875  * elif self.free_data: # <<<<<<<<<<<<<<
21876  * if self.dtype_is_object:
21877  * refcount_objects_in_slice(self.data, self._shape,
21878  */
21879  }
21880  __pyx_L3:;
21881 
21882  /* "View.MemoryView":219
21883  * self._strides, self.ndim, False)
21884  * free(self.data)
21885  * PyObject_Free(self._shape) # <<<<<<<<<<<<<<
21886  *
21887  * @property
21888  */
21889  PyObject_Free(__pyx_v_self->_shape);
21890 
21891  /* "View.MemoryView":211
21892  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)")
21893  *
21894  * def __dealloc__(array self): # <<<<<<<<<<<<<<
21895  * if self.callback_free_data != NULL:
21896  * self.callback_free_data(self.data)
21897  */
21898 
21899  /* function exit code */
21900  __Pyx_RefNannyFinishContext();
21901 }
21902 
21903 /* "View.MemoryView":222
21904  *
21905  * @property
21906  * def memview(self): # <<<<<<<<<<<<<<
21907  * return self.get_memview()
21908  *
21909  */
21910 
21911 /* Python wrapper */
21912 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self); /*proto*/
21913 static PyObject *__pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(PyObject *__pyx_v_self) {
21914  PyObject *__pyx_r = 0;
21915  __Pyx_RefNannyDeclarations
21916  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
21917  __pyx_r = __pyx_pf_15View_dot_MemoryView_5array_7memview___get__(((struct __pyx_array_obj *)__pyx_v_self));
21918 
21919  /* function exit code */
21920  __Pyx_RefNannyFinishContext();
21921  return __pyx_r;
21922 }
21923 
21924 static PyObject *__pyx_pf_15View_dot_MemoryView_5array_7memview___get__(struct __pyx_array_obj *__pyx_v_self) {
21925  PyObject *__pyx_r = NULL;
21926  __Pyx_RefNannyDeclarations
21927  PyObject *__pyx_t_1 = NULL;
21928  __Pyx_RefNannySetupContext("__get__", 0);
21929 
21930  /* "View.MemoryView":223
21931  * @property
21932  * def memview(self):
21933  * return self.get_memview() # <<<<<<<<<<<<<<
21934  *
21935  * @cname('get_memview')
21936  */
21937  __Pyx_XDECREF(__pyx_r);
21938  __pyx_t_1 = ((struct __pyx_vtabstruct_array *)__pyx_v_self->__pyx_vtab)->get_memview(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 223, __pyx_L1_error)
21939  __Pyx_GOTREF(__pyx_t_1);
21940  __pyx_r = __pyx_t_1;
21941  __pyx_t_1 = 0;
21942  goto __pyx_L0;
21943 
21944  /* "View.MemoryView":222
21945  *
21946  * @property
21947  * def memview(self): # <<<<<<<<<<<<<<
21948  * return self.get_memview()
21949  *
21950  */
21951 
21952  /* function exit code */
21953  __pyx_L1_error:;
21954  __Pyx_XDECREF(__pyx_t_1);
21955  __Pyx_AddTraceback("View.MemoryView.array.memview.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
21956  __pyx_r = NULL;
21957  __pyx_L0:;
21958  __Pyx_XGIVEREF(__pyx_r);
21959  __Pyx_RefNannyFinishContext();
21960  return __pyx_r;
21961 }
21962 
21963 /* "View.MemoryView":226
21964  *
21965  * @cname('get_memview')
21966  * cdef get_memview(self): # <<<<<<<<<<<<<<
21967  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
21968  * return memoryview(self, flags, self.dtype_is_object)
21969  */
21970 
21971 static PyObject *__pyx_array_get_memview(struct __pyx_array_obj *__pyx_v_self) {
21972  int __pyx_v_flags;
21973  PyObject *__pyx_r = NULL;
21974  __Pyx_RefNannyDeclarations
21975  PyObject *__pyx_t_1 = NULL;
21976  PyObject *__pyx_t_2 = NULL;
21977  PyObject *__pyx_t_3 = NULL;
21978  __Pyx_RefNannySetupContext("get_memview", 0);
21979 
21980  /* "View.MemoryView":227
21981  * @cname('get_memview')
21982  * cdef get_memview(self):
21983  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE # <<<<<<<<<<<<<<
21984  * return memoryview(self, flags, self.dtype_is_object)
21985  *
21986  */
21987  __pyx_v_flags = ((PyBUF_ANY_CONTIGUOUS | PyBUF_FORMAT) | PyBUF_WRITABLE);
21988 
21989  /* "View.MemoryView":228
21990  * cdef get_memview(self):
21991  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
21992  * return memoryview(self, flags, self.dtype_is_object) # <<<<<<<<<<<<<<
21993  *
21994  * def __len__(self):
21995  */
21996  __Pyx_XDECREF(__pyx_r);
21997  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
21998  __Pyx_GOTREF(__pyx_t_1);
21999  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
22000  __Pyx_GOTREF(__pyx_t_2);
22001  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 228, __pyx_L1_error)
22002  __Pyx_GOTREF(__pyx_t_3);
22003  __Pyx_INCREF(((PyObject *)__pyx_v_self));
22004  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
22005  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
22006  __Pyx_GIVEREF(__pyx_t_1);
22007  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
22008  __Pyx_GIVEREF(__pyx_t_2);
22009  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
22010  __pyx_t_1 = 0;
22011  __pyx_t_2 = 0;
22012  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
22013  __Pyx_GOTREF(__pyx_t_2);
22014  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22015  __pyx_r = __pyx_t_2;
22016  __pyx_t_2 = 0;
22017  goto __pyx_L0;
22018 
22019  /* "View.MemoryView":226
22020  *
22021  * @cname('get_memview')
22022  * cdef get_memview(self): # <<<<<<<<<<<<<<
22023  * flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE
22024  * return memoryview(self, flags, self.dtype_is_object)
22025  */
22026 
22027  /* function exit code */
22028  __pyx_L1_error:;
22029  __Pyx_XDECREF(__pyx_t_1);
22030  __Pyx_XDECREF(__pyx_t_2);
22031  __Pyx_XDECREF(__pyx_t_3);
22032  __Pyx_AddTraceback("View.MemoryView.array.get_memview", __pyx_clineno, __pyx_lineno, __pyx_filename);
22033  __pyx_r = 0;
22034  __pyx_L0:;
22035  __Pyx_XGIVEREF(__pyx_r);
22036  __Pyx_RefNannyFinishContext();
22037  return __pyx_r;
22038 }
22039 
22040 /* "View.MemoryView":230
22041  * return memoryview(self, flags, self.dtype_is_object)
22042  *
22043  * def __len__(self): # <<<<<<<<<<<<<<
22044  * return self._shape[0]
22045  *
22046  */
22047 
22048 /* Python wrapper */
22049 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self); /*proto*/
22050 static Py_ssize_t __pyx_array___len__(PyObject *__pyx_v_self) {
22051  Py_ssize_t __pyx_r;
22052  __Pyx_RefNannyDeclarations
22053  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
22054  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(((struct __pyx_array_obj *)__pyx_v_self));
22055 
22056  /* function exit code */
22057  __Pyx_RefNannyFinishContext();
22058  return __pyx_r;
22059 }
22060 
22061 static Py_ssize_t __pyx_array___pyx_pf_15View_dot_MemoryView_5array_6__len__(struct __pyx_array_obj *__pyx_v_self) {
22062  Py_ssize_t __pyx_r;
22063  __Pyx_RefNannyDeclarations
22064  __Pyx_RefNannySetupContext("__len__", 0);
22065 
22066  /* "View.MemoryView":231
22067  *
22068  * def __len__(self):
22069  * return self._shape[0] # <<<<<<<<<<<<<<
22070  *
22071  * def __getattr__(self, attr):
22072  */
22073  __pyx_r = (__pyx_v_self->_shape[0]);
22074  goto __pyx_L0;
22075 
22076  /* "View.MemoryView":230
22077  * return memoryview(self, flags, self.dtype_is_object)
22078  *
22079  * def __len__(self): # <<<<<<<<<<<<<<
22080  * return self._shape[0]
22081  *
22082  */
22083 
22084  /* function exit code */
22085  __pyx_L0:;
22086  __Pyx_RefNannyFinishContext();
22087  return __pyx_r;
22088 }
22089 
22090 /* "View.MemoryView":233
22091  * return self._shape[0]
22092  *
22093  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
22094  * return getattr(self.memview, attr)
22095  *
22096  */
22097 
22098 /* Python wrapper */
22099 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr); /*proto*/
22100 static PyObject *__pyx_array___getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_attr) {
22101  PyObject *__pyx_r = 0;
22102  __Pyx_RefNannyDeclarations
22103  __Pyx_RefNannySetupContext("__getattr__ (wrapper)", 0);
22104  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_attr));
22105 
22106  /* function exit code */
22107  __Pyx_RefNannyFinishContext();
22108  return __pyx_r;
22109 }
22110 
22111 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_8__getattr__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_attr) {
22112  PyObject *__pyx_r = NULL;
22113  __Pyx_RefNannyDeclarations
22114  PyObject *__pyx_t_1 = NULL;
22115  PyObject *__pyx_t_2 = NULL;
22116  __Pyx_RefNannySetupContext("__getattr__", 0);
22117 
22118  /* "View.MemoryView":234
22119  *
22120  * def __getattr__(self, attr):
22121  * return getattr(self.memview, attr) # <<<<<<<<<<<<<<
22122  *
22123  * def __getitem__(self, item):
22124  */
22125  __Pyx_XDECREF(__pyx_r);
22126  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error)
22127  __Pyx_GOTREF(__pyx_t_1);
22128  __pyx_t_2 = __Pyx_GetAttr(__pyx_t_1, __pyx_v_attr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error)
22129  __Pyx_GOTREF(__pyx_t_2);
22130  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22131  __pyx_r = __pyx_t_2;
22132  __pyx_t_2 = 0;
22133  goto __pyx_L0;
22134 
22135  /* "View.MemoryView":233
22136  * return self._shape[0]
22137  *
22138  * def __getattr__(self, attr): # <<<<<<<<<<<<<<
22139  * return getattr(self.memview, attr)
22140  *
22141  */
22142 
22143  /* function exit code */
22144  __pyx_L1_error:;
22145  __Pyx_XDECREF(__pyx_t_1);
22146  __Pyx_XDECREF(__pyx_t_2);
22147  __Pyx_AddTraceback("View.MemoryView.array.__getattr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22148  __pyx_r = NULL;
22149  __pyx_L0:;
22150  __Pyx_XGIVEREF(__pyx_r);
22151  __Pyx_RefNannyFinishContext();
22152  return __pyx_r;
22153 }
22154 
22155 /* "View.MemoryView":236
22156  * return getattr(self.memview, attr)
22157  *
22158  * def __getitem__(self, item): # <<<<<<<<<<<<<<
22159  * return self.memview[item]
22160  *
22161  */
22162 
22163 /* Python wrapper */
22164 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
22165 static PyObject *__pyx_array___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
22166  PyObject *__pyx_r = 0;
22167  __Pyx_RefNannyDeclarations
22168  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
22169  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item));
22170 
22171  /* function exit code */
22172  __Pyx_RefNannyFinishContext();
22173  return __pyx_r;
22174 }
22175 
22176 static PyObject *__pyx_array___pyx_pf_15View_dot_MemoryView_5array_10__getitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item) {
22177  PyObject *__pyx_r = NULL;
22178  __Pyx_RefNannyDeclarations
22179  PyObject *__pyx_t_1 = NULL;
22180  PyObject *__pyx_t_2 = NULL;
22181  __Pyx_RefNannySetupContext("__getitem__", 0);
22182 
22183  /* "View.MemoryView":237
22184  *
22185  * def __getitem__(self, item):
22186  * return self.memview[item] # <<<<<<<<<<<<<<
22187  *
22188  * def __setitem__(self, item, value):
22189  */
22190  __Pyx_XDECREF(__pyx_r);
22191  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error)
22192  __Pyx_GOTREF(__pyx_t_1);
22193  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error)
22194  __Pyx_GOTREF(__pyx_t_2);
22195  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22196  __pyx_r = __pyx_t_2;
22197  __pyx_t_2 = 0;
22198  goto __pyx_L0;
22199 
22200  /* "View.MemoryView":236
22201  * return getattr(self.memview, attr)
22202  *
22203  * def __getitem__(self, item): # <<<<<<<<<<<<<<
22204  * return self.memview[item]
22205  *
22206  */
22207 
22208  /* function exit code */
22209  __pyx_L1_error:;
22210  __Pyx_XDECREF(__pyx_t_1);
22211  __Pyx_XDECREF(__pyx_t_2);
22212  __Pyx_AddTraceback("View.MemoryView.array.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22213  __pyx_r = NULL;
22214  __pyx_L0:;
22215  __Pyx_XGIVEREF(__pyx_r);
22216  __Pyx_RefNannyFinishContext();
22217  return __pyx_r;
22218 }
22219 
22220 /* "View.MemoryView":239
22221  * return self.memview[item]
22222  *
22223  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
22224  * self.memview[item] = value
22225  *
22226  */
22227 
22228 /* Python wrapper */
22229 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value); /*proto*/
22230 static int __pyx_array___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
22231  int __pyx_r;
22232  __Pyx_RefNannyDeclarations
22233  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
22234  __pyx_r = __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v_item), ((PyObject *)__pyx_v_value));
22235 
22236  /* function exit code */
22237  __Pyx_RefNannyFinishContext();
22238  return __pyx_r;
22239 }
22240 
22241 static int __pyx_array___pyx_pf_15View_dot_MemoryView_5array_12__setitem__(struct __pyx_array_obj *__pyx_v_self, PyObject *__pyx_v_item, PyObject *__pyx_v_value) {
22242  int __pyx_r;
22243  __Pyx_RefNannyDeclarations
22244  PyObject *__pyx_t_1 = NULL;
22245  __Pyx_RefNannySetupContext("__setitem__", 0);
22246 
22247  /* "View.MemoryView":240
22248  *
22249  * def __setitem__(self, item, value):
22250  * self.memview[item] = value # <<<<<<<<<<<<<<
22251  *
22252  *
22253  */
22254  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_memview); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
22255  __Pyx_GOTREF(__pyx_t_1);
22256  if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_item, __pyx_v_value) < 0)) __PYX_ERR(0, 240, __pyx_L1_error)
22257  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22258 
22259  /* "View.MemoryView":239
22260  * return self.memview[item]
22261  *
22262  * def __setitem__(self, item, value): # <<<<<<<<<<<<<<
22263  * self.memview[item] = value
22264  *
22265  */
22266 
22267  /* function exit code */
22268  __pyx_r = 0;
22269  goto __pyx_L0;
22270  __pyx_L1_error:;
22271  __Pyx_XDECREF(__pyx_t_1);
22272  __Pyx_AddTraceback("View.MemoryView.array.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22273  __pyx_r = -1;
22274  __pyx_L0:;
22275  __Pyx_RefNannyFinishContext();
22276  return __pyx_r;
22277 }
22278 
22279 /* "(tree fragment)":1
22280  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
22281  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22282  * def __setstate_cython__(self, __pyx_state):
22283  */
22284 
22285 /* Python wrapper */
22286 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
22287 static PyObject *__pyx_pw___pyx_array_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
22288  PyObject *__pyx_r = 0;
22289  __Pyx_RefNannyDeclarations
22290  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
22291  __pyx_r = __pyx_pf___pyx_array___reduce_cython__(((struct __pyx_array_obj *)__pyx_v_self));
22292 
22293  /* function exit code */
22294  __Pyx_RefNannyFinishContext();
22295  return __pyx_r;
22296 }
22297 
22298 static PyObject *__pyx_pf___pyx_array___reduce_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self) {
22299  PyObject *__pyx_r = NULL;
22300  __Pyx_RefNannyDeclarations
22301  PyObject *__pyx_t_1 = NULL;
22302  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
22303 
22304  /* "(tree fragment)":2
22305  * def __reduce_cython__(self):
22306  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
22307  * def __setstate_cython__(self, __pyx_state):
22308  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22309  */
22310  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
22311  __Pyx_GOTREF(__pyx_t_1);
22312  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
22313  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22314  __PYX_ERR(0, 2, __pyx_L1_error)
22315 
22316  /* "(tree fragment)":1
22317  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
22318  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22319  * def __setstate_cython__(self, __pyx_state):
22320  */
22321 
22322  /* function exit code */
22323  __pyx_L1_error:;
22324  __Pyx_XDECREF(__pyx_t_1);
22325  __Pyx_AddTraceback("View.MemoryView.array.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22326  __pyx_r = NULL;
22327  __Pyx_XGIVEREF(__pyx_r);
22328  __Pyx_RefNannyFinishContext();
22329  return __pyx_r;
22330 }
22331 
22332 /* "(tree fragment)":3
22333  * def __reduce_cython__(self):
22334  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22335  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
22336  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22337  */
22338 
22339 /* Python wrapper */
22340 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
22341 static PyObject *__pyx_pw___pyx_array_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
22342  PyObject *__pyx_r = 0;
22343  __Pyx_RefNannyDeclarations
22344  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
22345  __pyx_r = __pyx_pf___pyx_array_2__setstate_cython__(((struct __pyx_array_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
22346 
22347  /* function exit code */
22348  __Pyx_RefNannyFinishContext();
22349  return __pyx_r;
22350 }
22351 
22352 static PyObject *__pyx_pf___pyx_array_2__setstate_cython__(CYTHON_UNUSED struct __pyx_array_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
22353  PyObject *__pyx_r = NULL;
22354  __Pyx_RefNannyDeclarations
22355  PyObject *__pyx_t_1 = NULL;
22356  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
22357 
22358  /* "(tree fragment)":4
22359  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22360  * def __setstate_cython__(self, __pyx_state):
22361  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
22362  */
22363  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
22364  __Pyx_GOTREF(__pyx_t_1);
22365  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
22366  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22367  __PYX_ERR(0, 4, __pyx_L1_error)
22368 
22369  /* "(tree fragment)":3
22370  * def __reduce_cython__(self):
22371  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22372  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
22373  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
22374  */
22375 
22376  /* function exit code */
22377  __pyx_L1_error:;
22378  __Pyx_XDECREF(__pyx_t_1);
22379  __Pyx_AddTraceback("View.MemoryView.array.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22380  __pyx_r = NULL;
22381  __Pyx_XGIVEREF(__pyx_r);
22382  __Pyx_RefNannyFinishContext();
22383  return __pyx_r;
22384 }
22385 
22386 /* "View.MemoryView":244
22387  *
22388  * @cname("__pyx_array_new")
22389  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
22390  * char *mode, char *buf):
22391  * cdef array result
22392  */
22393 
22394 static struct __pyx_array_obj *__pyx_array_new(PyObject *__pyx_v_shape, Py_ssize_t __pyx_v_itemsize, char *__pyx_v_format, char *__pyx_v_mode, char *__pyx_v_buf) {
22395  struct __pyx_array_obj *__pyx_v_result = 0;
22396  struct __pyx_array_obj *__pyx_r = NULL;
22397  __Pyx_RefNannyDeclarations
22398  int __pyx_t_1;
22399  PyObject *__pyx_t_2 = NULL;
22400  PyObject *__pyx_t_3 = NULL;
22401  PyObject *__pyx_t_4 = NULL;
22402  PyObject *__pyx_t_5 = NULL;
22403  __Pyx_RefNannySetupContext("array_cwrapper", 0);
22404 
22405  /* "View.MemoryView":248
22406  * cdef array result
22407  *
22408  * if buf == NULL: # <<<<<<<<<<<<<<
22409  * result = array(shape, itemsize, format, mode.decode('ASCII'))
22410  * else:
22411  */
22412  __pyx_t_1 = ((__pyx_v_buf == NULL) != 0);
22413  if (__pyx_t_1) {
22414 
22415  /* "View.MemoryView":249
22416  *
22417  * if buf == NULL:
22418  * result = array(shape, itemsize, format, mode.decode('ASCII')) # <<<<<<<<<<<<<<
22419  * else:
22420  * result = array(shape, itemsize, format, mode.decode('ASCII'),
22421  */
22422  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
22423  __Pyx_GOTREF(__pyx_t_2);
22424  __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
22425  __Pyx_GOTREF(__pyx_t_3);
22426  __pyx_t_4 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error)
22427  __Pyx_GOTREF(__pyx_t_4);
22428  __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 249, __pyx_L1_error)
22429  __Pyx_GOTREF(__pyx_t_5);
22430  __Pyx_INCREF(__pyx_v_shape);
22431  __Pyx_GIVEREF(__pyx_v_shape);
22432  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_shape);
22433  __Pyx_GIVEREF(__pyx_t_2);
22434  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
22435  __Pyx_GIVEREF(__pyx_t_3);
22436  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
22437  __Pyx_GIVEREF(__pyx_t_4);
22438  PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
22439  __pyx_t_2 = 0;
22440  __pyx_t_3 = 0;
22441  __pyx_t_4 = 0;
22442  __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 249, __pyx_L1_error)
22443  __Pyx_GOTREF(__pyx_t_4);
22444  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
22445  __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_4);
22446  __pyx_t_4 = 0;
22447 
22448  /* "View.MemoryView":248
22449  * cdef array result
22450  *
22451  * if buf == NULL: # <<<<<<<<<<<<<<
22452  * result = array(shape, itemsize, format, mode.decode('ASCII'))
22453  * else:
22454  */
22455  goto __pyx_L3;
22456  }
22457 
22458  /* "View.MemoryView":251
22459  * result = array(shape, itemsize, format, mode.decode('ASCII'))
22460  * else:
22461  * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
22462  * allocate_buffer=False)
22463  * result.data = buf
22464  */
22465  /*else*/ {
22466  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_itemsize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L1_error)
22467  __Pyx_GOTREF(__pyx_t_4);
22468  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error)
22469  __Pyx_GOTREF(__pyx_t_5);
22470  __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_mode, 0, strlen(__pyx_v_mode), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 251, __pyx_L1_error)
22471  __Pyx_GOTREF(__pyx_t_3);
22472  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L1_error)
22473  __Pyx_GOTREF(__pyx_t_2);
22474  __Pyx_INCREF(__pyx_v_shape);
22475  __Pyx_GIVEREF(__pyx_v_shape);
22476  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_shape);
22477  __Pyx_GIVEREF(__pyx_t_4);
22478  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4);
22479  __Pyx_GIVEREF(__pyx_t_5);
22480  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5);
22481  __Pyx_GIVEREF(__pyx_t_3);
22482  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
22483  __pyx_t_4 = 0;
22484  __pyx_t_5 = 0;
22485  __pyx_t_3 = 0;
22486 
22487  /* "View.MemoryView":252
22488  * else:
22489  * result = array(shape, itemsize, format, mode.decode('ASCII'),
22490  * allocate_buffer=False) # <<<<<<<<<<<<<<
22491  * result.data = buf
22492  *
22493  */
22494  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 252, __pyx_L1_error)
22495  __Pyx_GOTREF(__pyx_t_3);
22496  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_allocate_buffer, Py_False) < 0) __PYX_ERR(0, 252, __pyx_L1_error)
22497 
22498  /* "View.MemoryView":251
22499  * result = array(shape, itemsize, format, mode.decode('ASCII'))
22500  * else:
22501  * result = array(shape, itemsize, format, mode.decode('ASCII'), # <<<<<<<<<<<<<<
22502  * allocate_buffer=False)
22503  * result.data = buf
22504  */
22505  __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_array_type), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L1_error)
22506  __Pyx_GOTREF(__pyx_t_5);
22507  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
22508  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
22509  __pyx_v_result = ((struct __pyx_array_obj *)__pyx_t_5);
22510  __pyx_t_5 = 0;
22511 
22512  /* "View.MemoryView":253
22513  * result = array(shape, itemsize, format, mode.decode('ASCII'),
22514  * allocate_buffer=False)
22515  * result.data = buf # <<<<<<<<<<<<<<
22516  *
22517  * return result
22518  */
22519  __pyx_v_result->data = __pyx_v_buf;
22520  }
22521  __pyx_L3:;
22522 
22523  /* "View.MemoryView":255
22524  * result.data = buf
22525  *
22526  * return result # <<<<<<<<<<<<<<
22527  *
22528  *
22529  */
22530  __Pyx_XDECREF(((PyObject *)__pyx_r));
22531  __Pyx_INCREF(((PyObject *)__pyx_v_result));
22532  __pyx_r = __pyx_v_result;
22533  goto __pyx_L0;
22534 
22535  /* "View.MemoryView":244
22536  *
22537  * @cname("__pyx_array_new")
22538  * cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, # <<<<<<<<<<<<<<
22539  * char *mode, char *buf):
22540  * cdef array result
22541  */
22542 
22543  /* function exit code */
22544  __pyx_L1_error:;
22545  __Pyx_XDECREF(__pyx_t_2);
22546  __Pyx_XDECREF(__pyx_t_3);
22547  __Pyx_XDECREF(__pyx_t_4);
22548  __Pyx_XDECREF(__pyx_t_5);
22549  __Pyx_AddTraceback("View.MemoryView.array_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
22550  __pyx_r = 0;
22551  __pyx_L0:;
22552  __Pyx_XDECREF((PyObject *)__pyx_v_result);
22553  __Pyx_XGIVEREF((PyObject *)__pyx_r);
22554  __Pyx_RefNannyFinishContext();
22555  return __pyx_r;
22556 }
22557 
22558 /* "View.MemoryView":281
22559  * cdef class Enum(object):
22560  * cdef object name
22561  * def __init__(self, name): # <<<<<<<<<<<<<<
22562  * self.name = name
22563  * def __repr__(self):
22564  */
22565 
22566 /* Python wrapper */
22567 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
22568 static int __pyx_MemviewEnum___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
22569  PyObject *__pyx_v_name = 0;
22570  int __pyx_r;
22571  __Pyx_RefNannyDeclarations
22572  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
22573  {
22574  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
22575  PyObject* values[1] = {0};
22576  if (unlikely(__pyx_kwds)) {
22577  Py_ssize_t kw_args;
22578  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
22579  switch (pos_args) {
22580  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22581  CYTHON_FALLTHROUGH;
22582  case 0: break;
22583  default: goto __pyx_L5_argtuple_error;
22584  }
22585  kw_args = PyDict_Size(__pyx_kwds);
22586  switch (pos_args) {
22587  case 0:
22588  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
22589  else goto __pyx_L5_argtuple_error;
22590  }
22591  if (unlikely(kw_args > 0)) {
22592  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 281, __pyx_L3_error)
22593  }
22594  } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
22595  goto __pyx_L5_argtuple_error;
22596  } else {
22597  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
22598  }
22599  __pyx_v_name = values[0];
22600  }
22601  goto __pyx_L4_argument_unpacking_done;
22602  __pyx_L5_argtuple_error:;
22603  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 281, __pyx_L3_error)
22604  __pyx_L3_error:;
22605  __Pyx_AddTraceback("View.MemoryView.Enum.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22606  __Pyx_RefNannyFinishContext();
22607  return -1;
22608  __pyx_L4_argument_unpacking_done:;
22609  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), __pyx_v_name);
22610 
22611  /* function exit code */
22612  __Pyx_RefNannyFinishContext();
22613  return __pyx_r;
22614 }
22615 
22616 static int __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum___init__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v_name) {
22617  int __pyx_r;
22618  __Pyx_RefNannyDeclarations
22619  __Pyx_RefNannySetupContext("__init__", 0);
22620 
22621  /* "View.MemoryView":282
22622  * cdef object name
22623  * def __init__(self, name):
22624  * self.name = name # <<<<<<<<<<<<<<
22625  * def __repr__(self):
22626  * return self.name
22627  */
22628  __Pyx_INCREF(__pyx_v_name);
22629  __Pyx_GIVEREF(__pyx_v_name);
22630  __Pyx_GOTREF(__pyx_v_self->name);
22631  __Pyx_DECREF(__pyx_v_self->name);
22632  __pyx_v_self->name = __pyx_v_name;
22633 
22634  /* "View.MemoryView":281
22635  * cdef class Enum(object):
22636  * cdef object name
22637  * def __init__(self, name): # <<<<<<<<<<<<<<
22638  * self.name = name
22639  * def __repr__(self):
22640  */
22641 
22642  /* function exit code */
22643  __pyx_r = 0;
22644  __Pyx_RefNannyFinishContext();
22645  return __pyx_r;
22646 }
22647 
22648 /* "View.MemoryView":283
22649  * def __init__(self, name):
22650  * self.name = name
22651  * def __repr__(self): # <<<<<<<<<<<<<<
22652  * return self.name
22653  *
22654  */
22655 
22656 /* Python wrapper */
22657 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self); /*proto*/
22658 static PyObject *__pyx_MemviewEnum___repr__(PyObject *__pyx_v_self) {
22659  PyObject *__pyx_r = 0;
22660  __Pyx_RefNannyDeclarations
22661  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
22662  __pyx_r = __pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
22663 
22664  /* function exit code */
22665  __Pyx_RefNannyFinishContext();
22666  return __pyx_r;
22667 }
22668 
22669 static PyObject *__pyx_MemviewEnum___pyx_pf_15View_dot_MemoryView_4Enum_2__repr__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
22670  PyObject *__pyx_r = NULL;
22671  __Pyx_RefNannyDeclarations
22672  __Pyx_RefNannySetupContext("__repr__", 0);
22673 
22674  /* "View.MemoryView":284
22675  * self.name = name
22676  * def __repr__(self):
22677  * return self.name # <<<<<<<<<<<<<<
22678  *
22679  * cdef generic = Enum("<strided and direct or indirect>")
22680  */
22681  __Pyx_XDECREF(__pyx_r);
22682  __Pyx_INCREF(__pyx_v_self->name);
22683  __pyx_r = __pyx_v_self->name;
22684  goto __pyx_L0;
22685 
22686  /* "View.MemoryView":283
22687  * def __init__(self, name):
22688  * self.name = name
22689  * def __repr__(self): # <<<<<<<<<<<<<<
22690  * return self.name
22691  *
22692  */
22693 
22694  /* function exit code */
22695  __pyx_L0:;
22696  __Pyx_XGIVEREF(__pyx_r);
22697  __Pyx_RefNannyFinishContext();
22698  return __pyx_r;
22699 }
22700 
22701 /* "(tree fragment)":1
22702  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
22703  * cdef tuple state
22704  * cdef object _dict
22705  */
22706 
22707 /* Python wrapper */
22708 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
22709 static PyObject *__pyx_pw___pyx_MemviewEnum_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
22710  PyObject *__pyx_r = 0;
22711  __Pyx_RefNannyDeclarations
22712  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
22713  __pyx_r = __pyx_pf___pyx_MemviewEnum___reduce_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self));
22714 
22715  /* function exit code */
22716  __Pyx_RefNannyFinishContext();
22717  return __pyx_r;
22718 }
22719 
22720 static PyObject *__pyx_pf___pyx_MemviewEnum___reduce_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self) {
22721  PyObject *__pyx_v_state = 0;
22722  PyObject *__pyx_v__dict = 0;
22723  int __pyx_v_use_setstate;
22724  PyObject *__pyx_r = NULL;
22725  __Pyx_RefNannyDeclarations
22726  PyObject *__pyx_t_1 = NULL;
22727  int __pyx_t_2;
22728  int __pyx_t_3;
22729  PyObject *__pyx_t_4 = NULL;
22730  PyObject *__pyx_t_5 = NULL;
22731  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
22732 
22733  /* "(tree fragment)":5
22734  * cdef object _dict
22735  * cdef bint use_setstate
22736  * state = (self.name,) # <<<<<<<<<<<<<<
22737  * _dict = getattr(self, '__dict__', None)
22738  * if _dict is not None:
22739  */
22740  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error)
22741  __Pyx_GOTREF(__pyx_t_1);
22742  __Pyx_INCREF(__pyx_v_self->name);
22743  __Pyx_GIVEREF(__pyx_v_self->name);
22744  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name);
22745  __pyx_v_state = ((PyObject*)__pyx_t_1);
22746  __pyx_t_1 = 0;
22747 
22748  /* "(tree fragment)":6
22749  * cdef bint use_setstate
22750  * state = (self.name,)
22751  * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
22752  * if _dict is not None:
22753  * state += (_dict,)
22754  */
22755  __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error)
22756  __Pyx_GOTREF(__pyx_t_1);
22757  __pyx_v__dict = __pyx_t_1;
22758  __pyx_t_1 = 0;
22759 
22760  /* "(tree fragment)":7
22761  * state = (self.name,)
22762  * _dict = getattr(self, '__dict__', None)
22763  * if _dict is not None: # <<<<<<<<<<<<<<
22764  * state += (_dict,)
22765  * use_setstate = True
22766  */
22767  __pyx_t_2 = (__pyx_v__dict != Py_None);
22768  __pyx_t_3 = (__pyx_t_2 != 0);
22769  if (__pyx_t_3) {
22770 
22771  /* "(tree fragment)":8
22772  * _dict = getattr(self, '__dict__', None)
22773  * if _dict is not None:
22774  * state += (_dict,) # <<<<<<<<<<<<<<
22775  * use_setstate = True
22776  * else:
22777  */
22778  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error)
22779  __Pyx_GOTREF(__pyx_t_1);
22780  __Pyx_INCREF(__pyx_v__dict);
22781  __Pyx_GIVEREF(__pyx_v__dict);
22782  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict);
22783  __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 8, __pyx_L1_error)
22784  __Pyx_GOTREF(__pyx_t_4);
22785  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22786  __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4));
22787  __pyx_t_4 = 0;
22788 
22789  /* "(tree fragment)":9
22790  * if _dict is not None:
22791  * state += (_dict,)
22792  * use_setstate = True # <<<<<<<<<<<<<<
22793  * else:
22794  * use_setstate = self.name is not None
22795  */
22796  __pyx_v_use_setstate = 1;
22797 
22798  /* "(tree fragment)":7
22799  * state = (self.name,)
22800  * _dict = getattr(self, '__dict__', None)
22801  * if _dict is not None: # <<<<<<<<<<<<<<
22802  * state += (_dict,)
22803  * use_setstate = True
22804  */
22805  goto __pyx_L3;
22806  }
22807 
22808  /* "(tree fragment)":11
22809  * use_setstate = True
22810  * else:
22811  * use_setstate = self.name is not None # <<<<<<<<<<<<<<
22812  * if use_setstate:
22813  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
22814  */
22815  /*else*/ {
22816  __pyx_t_3 = (__pyx_v_self->name != Py_None);
22817  __pyx_v_use_setstate = __pyx_t_3;
22818  }
22819  __pyx_L3:;
22820 
22821  /* "(tree fragment)":12
22822  * else:
22823  * use_setstate = self.name is not None
22824  * if use_setstate: # <<<<<<<<<<<<<<
22825  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
22826  * else:
22827  */
22828  __pyx_t_3 = (__pyx_v_use_setstate != 0);
22829  if (__pyx_t_3) {
22830 
22831  /* "(tree fragment)":13
22832  * use_setstate = self.name is not None
22833  * if use_setstate:
22834  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state # <<<<<<<<<<<<<<
22835  * else:
22836  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
22837  */
22838  __Pyx_XDECREF(__pyx_r);
22839  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 13, __pyx_L1_error)
22840  __Pyx_GOTREF(__pyx_t_4);
22841  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
22842  __Pyx_GOTREF(__pyx_t_1);
22843  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22844  __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22845  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22846  __Pyx_INCREF(__pyx_int_184977713);
22847  __Pyx_GIVEREF(__pyx_int_184977713);
22848  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
22849  __Pyx_INCREF(Py_None);
22850  __Pyx_GIVEREF(Py_None);
22851  PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None);
22852  __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 13, __pyx_L1_error)
22853  __Pyx_GOTREF(__pyx_t_5);
22854  __Pyx_GIVEREF(__pyx_t_4);
22855  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
22856  __Pyx_GIVEREF(__pyx_t_1);
22857  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1);
22858  __Pyx_INCREF(__pyx_v_state);
22859  __Pyx_GIVEREF(__pyx_v_state);
22860  PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state);
22861  __pyx_t_4 = 0;
22862  __pyx_t_1 = 0;
22863  __pyx_r = __pyx_t_5;
22864  __pyx_t_5 = 0;
22865  goto __pyx_L0;
22866 
22867  /* "(tree fragment)":12
22868  * else:
22869  * use_setstate = self.name is not None
22870  * if use_setstate: # <<<<<<<<<<<<<<
22871  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
22872  * else:
22873  */
22874  }
22875 
22876  /* "(tree fragment)":15
22877  * return __pyx_unpickle_Enum, (type(self), 0xb068931, None), state
22878  * else:
22879  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state) # <<<<<<<<<<<<<<
22880  * def __setstate_cython__(self, __pyx_state):
22881  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
22882  */
22883  /*else*/ {
22884  __Pyx_XDECREF(__pyx_r);
22885  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_Enum); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 15, __pyx_L1_error)
22886  __Pyx_GOTREF(__pyx_t_5);
22887  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
22888  __Pyx_GOTREF(__pyx_t_1);
22889  __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22890  __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22891  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
22892  __Pyx_INCREF(__pyx_int_184977713);
22893  __Pyx_GIVEREF(__pyx_int_184977713);
22894  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_184977713);
22895  __Pyx_INCREF(__pyx_v_state);
22896  __Pyx_GIVEREF(__pyx_v_state);
22897  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state);
22898  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 15, __pyx_L1_error)
22899  __Pyx_GOTREF(__pyx_t_4);
22900  __Pyx_GIVEREF(__pyx_t_5);
22901  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
22902  __Pyx_GIVEREF(__pyx_t_1);
22903  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
22904  __pyx_t_5 = 0;
22905  __pyx_t_1 = 0;
22906  __pyx_r = __pyx_t_4;
22907  __pyx_t_4 = 0;
22908  goto __pyx_L0;
22909  }
22910 
22911  /* "(tree fragment)":1
22912  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
22913  * cdef tuple state
22914  * cdef object _dict
22915  */
22916 
22917  /* function exit code */
22918  __pyx_L1_error:;
22919  __Pyx_XDECREF(__pyx_t_1);
22920  __Pyx_XDECREF(__pyx_t_4);
22921  __Pyx_XDECREF(__pyx_t_5);
22922  __Pyx_AddTraceback("View.MemoryView.Enum.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22923  __pyx_r = NULL;
22924  __pyx_L0:;
22925  __Pyx_XDECREF(__pyx_v_state);
22926  __Pyx_XDECREF(__pyx_v__dict);
22927  __Pyx_XGIVEREF(__pyx_r);
22928  __Pyx_RefNannyFinishContext();
22929  return __pyx_r;
22930 }
22931 
22932 /* "(tree fragment)":16
22933  * else:
22934  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
22935  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
22936  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
22937  */
22938 
22939 /* Python wrapper */
22940 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
22941 static PyObject *__pyx_pw___pyx_MemviewEnum_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
22942  PyObject *__pyx_r = 0;
22943  __Pyx_RefNannyDeclarations
22944  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
22945  __pyx_r = __pyx_pf___pyx_MemviewEnum_2__setstate_cython__(((struct __pyx_MemviewEnum_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
22946 
22947  /* function exit code */
22948  __Pyx_RefNannyFinishContext();
22949  return __pyx_r;
22950 }
22951 
22952 static PyObject *__pyx_pf___pyx_MemviewEnum_2__setstate_cython__(struct __pyx_MemviewEnum_obj *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
22953  PyObject *__pyx_r = NULL;
22954  __Pyx_RefNannyDeclarations
22955  PyObject *__pyx_t_1 = NULL;
22956  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
22957 
22958  /* "(tree fragment)":17
22959  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
22960  * def __setstate_cython__(self, __pyx_state):
22961  * __pyx_unpickle_Enum__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
22962  */
22963  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(0, 17, __pyx_L1_error)
22964  __pyx_t_1 = __pyx_unpickle_Enum__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
22965  __Pyx_GOTREF(__pyx_t_1);
22966  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22967 
22968  /* "(tree fragment)":16
22969  * else:
22970  * return __pyx_unpickle_Enum, (type(self), 0xb068931, state)
22971  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
22972  * __pyx_unpickle_Enum__set_state(self, __pyx_state)
22973  */
22974 
22975  /* function exit code */
22976  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
22977  goto __pyx_L0;
22978  __pyx_L1_error:;
22979  __Pyx_XDECREF(__pyx_t_1);
22980  __Pyx_AddTraceback("View.MemoryView.Enum.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
22981  __pyx_r = NULL;
22982  __pyx_L0:;
22983  __Pyx_XGIVEREF(__pyx_r);
22984  __Pyx_RefNannyFinishContext();
22985  return __pyx_r;
22986 }
22987 
22988 /* "View.MemoryView":298
22989  *
22990  * @cname('__pyx_align_pointer')
22991  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
22992  * "Align pointer memory on a given boundary"
22993  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
22994  */
22995 
22996 static void *__pyx_align_pointer(void *__pyx_v_memory, size_t __pyx_v_alignment) {
22997  Py_intptr_t __pyx_v_aligned_p;
22998  size_t __pyx_v_offset;
22999  void *__pyx_r;
23000  int __pyx_t_1;
23001 
23002  /* "View.MemoryView":300
23003  * cdef void *align_pointer(void *memory, size_t alignment) nogil:
23004  * "Align pointer memory on a given boundary"
23005  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory # <<<<<<<<<<<<<<
23006  * cdef size_t offset
23007  *
23008  */
23009  __pyx_v_aligned_p = ((Py_intptr_t)__pyx_v_memory);
23010 
23011  /* "View.MemoryView":304
23012  *
23013  * with cython.cdivision(True):
23014  * offset = aligned_p % alignment # <<<<<<<<<<<<<<
23015  *
23016  * if offset > 0:
23017  */
23018  __pyx_v_offset = (__pyx_v_aligned_p % __pyx_v_alignment);
23019 
23020  /* "View.MemoryView":306
23021  * offset = aligned_p % alignment
23022  *
23023  * if offset > 0: # <<<<<<<<<<<<<<
23024  * aligned_p += alignment - offset
23025  *
23026  */
23027  __pyx_t_1 = ((__pyx_v_offset > 0) != 0);
23028  if (__pyx_t_1) {
23029 
23030  /* "View.MemoryView":307
23031  *
23032  * if offset > 0:
23033  * aligned_p += alignment - offset # <<<<<<<<<<<<<<
23034  *
23035  * return <void *> aligned_p
23036  */
23037  __pyx_v_aligned_p = (__pyx_v_aligned_p + (__pyx_v_alignment - __pyx_v_offset));
23038 
23039  /* "View.MemoryView":306
23040  * offset = aligned_p % alignment
23041  *
23042  * if offset > 0: # <<<<<<<<<<<<<<
23043  * aligned_p += alignment - offset
23044  *
23045  */
23046  }
23047 
23048  /* "View.MemoryView":309
23049  * aligned_p += alignment - offset
23050  *
23051  * return <void *> aligned_p # <<<<<<<<<<<<<<
23052  *
23053  *
23054  */
23055  __pyx_r = ((void *)__pyx_v_aligned_p);
23056  goto __pyx_L0;
23057 
23058  /* "View.MemoryView":298
23059  *
23060  * @cname('__pyx_align_pointer')
23061  * cdef void *align_pointer(void *memory, size_t alignment) nogil: # <<<<<<<<<<<<<<
23062  * "Align pointer memory on a given boundary"
23063  * cdef Py_intptr_t aligned_p = <Py_intptr_t> memory
23064  */
23065 
23066  /* function exit code */
23067  __pyx_L0:;
23068  return __pyx_r;
23069 }
23070 
23071 /* "View.MemoryView":345
23072  * cdef __Pyx_TypeInfo *typeinfo
23073  *
23074  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
23075  * self.obj = obj
23076  * self.flags = flags
23077  */
23078 
23079 /* Python wrapper */
23080 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
23081 static int __pyx_memoryview___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
23082  PyObject *__pyx_v_obj = 0;
23083  int __pyx_v_flags;
23084  int __pyx_v_dtype_is_object;
23085  int __pyx_r;
23086  __Pyx_RefNannyDeclarations
23087  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
23088  {
23089  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_flags,&__pyx_n_s_dtype_is_object,0};
23090  PyObject* values[3] = {0,0,0};
23091  if (unlikely(__pyx_kwds)) {
23092  Py_ssize_t kw_args;
23093  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
23094  switch (pos_args) {
23095  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23096  CYTHON_FALLTHROUGH;
23097  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23098  CYTHON_FALLTHROUGH;
23099  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23100  CYTHON_FALLTHROUGH;
23101  case 0: break;
23102  default: goto __pyx_L5_argtuple_error;
23103  }
23104  kw_args = PyDict_Size(__pyx_kwds);
23105  switch (pos_args) {
23106  case 0:
23107  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
23108  else goto __pyx_L5_argtuple_error;
23109  CYTHON_FALLTHROUGH;
23110  case 1:
23111  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_flags)) != 0)) kw_args--;
23112  else {
23113  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(0, 345, __pyx_L3_error)
23114  }
23115  CYTHON_FALLTHROUGH;
23116  case 2:
23117  if (kw_args > 0) {
23118  PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dtype_is_object);
23119  if (value) { values[2] = value; kw_args--; }
23120  }
23121  }
23122  if (unlikely(kw_args > 0)) {
23123  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 345, __pyx_L3_error)
23124  }
23125  } else {
23126  switch (PyTuple_GET_SIZE(__pyx_args)) {
23127  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
23128  CYTHON_FALLTHROUGH;
23129  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
23130  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
23131  break;
23132  default: goto __pyx_L5_argtuple_error;
23133  }
23134  }
23135  __pyx_v_obj = values[0];
23136  __pyx_v_flags = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_flags == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error)
23137  if (values[2]) {
23138  __pyx_v_dtype_is_object = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_dtype_is_object == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 345, __pyx_L3_error)
23139  } else {
23140  __pyx_v_dtype_is_object = ((int)0);
23141  }
23142  }
23143  goto __pyx_L4_argument_unpacking_done;
23144  __pyx_L5_argtuple_error:;
23145  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 345, __pyx_L3_error)
23146  __pyx_L3_error:;
23147  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23148  __Pyx_RefNannyFinishContext();
23149  return -1;
23150  __pyx_L4_argument_unpacking_done:;
23151  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_obj, __pyx_v_flags, __pyx_v_dtype_is_object);
23152 
23153  /* function exit code */
23154  __Pyx_RefNannyFinishContext();
23155  return __pyx_r;
23156 }
23157 
23158 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview___cinit__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj, int __pyx_v_flags, int __pyx_v_dtype_is_object) {
23159  int __pyx_r;
23160  __Pyx_RefNannyDeclarations
23161  int __pyx_t_1;
23162  int __pyx_t_2;
23163  int __pyx_t_3;
23164  int __pyx_t_4;
23165  __Pyx_RefNannySetupContext("__cinit__", 0);
23166 
23167  /* "View.MemoryView":346
23168  *
23169  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
23170  * self.obj = obj # <<<<<<<<<<<<<<
23171  * self.flags = flags
23172  * if type(self) is memoryview or obj is not None:
23173  */
23174  __Pyx_INCREF(__pyx_v_obj);
23175  __Pyx_GIVEREF(__pyx_v_obj);
23176  __Pyx_GOTREF(__pyx_v_self->obj);
23177  __Pyx_DECREF(__pyx_v_self->obj);
23178  __pyx_v_self->obj = __pyx_v_obj;
23179 
23180  /* "View.MemoryView":347
23181  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False):
23182  * self.obj = obj
23183  * self.flags = flags # <<<<<<<<<<<<<<
23184  * if type(self) is memoryview or obj is not None:
23185  * __Pyx_GetBuffer(obj, &self.view, flags)
23186  */
23187  __pyx_v_self->flags = __pyx_v_flags;
23188 
23189  /* "View.MemoryView":348
23190  * self.obj = obj
23191  * self.flags = flags
23192  * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
23193  * __Pyx_GetBuffer(obj, &self.view, flags)
23194  * if <PyObject *> self.view.obj == NULL:
23195  */
23196  __pyx_t_2 = (((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))) == ((PyObject *)__pyx_memoryview_type));
23197  __pyx_t_3 = (__pyx_t_2 != 0);
23198  if (!__pyx_t_3) {
23199  } else {
23200  __pyx_t_1 = __pyx_t_3;
23201  goto __pyx_L4_bool_binop_done;
23202  }
23203  __pyx_t_3 = (__pyx_v_obj != Py_None);
23204  __pyx_t_2 = (__pyx_t_3 != 0);
23205  __pyx_t_1 = __pyx_t_2;
23206  __pyx_L4_bool_binop_done:;
23207  if (__pyx_t_1) {
23208 
23209  /* "View.MemoryView":349
23210  * self.flags = flags
23211  * if type(self) is memoryview or obj is not None:
23212  * __Pyx_GetBuffer(obj, &self.view, flags) # <<<<<<<<<<<<<<
23213  * if <PyObject *> self.view.obj == NULL:
23214  * (<__pyx_buffer *> &self.view).obj = Py_None
23215  */
23216  __pyx_t_4 = __Pyx_GetBuffer(__pyx_v_obj, (&__pyx_v_self->view), __pyx_v_flags); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 349, __pyx_L1_error)
23217 
23218  /* "View.MemoryView":350
23219  * if type(self) is memoryview or obj is not None:
23220  * __Pyx_GetBuffer(obj, &self.view, flags)
23221  * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
23222  * (<__pyx_buffer *> &self.view).obj = Py_None
23223  * Py_INCREF(Py_None)
23224  */
23225  __pyx_t_1 = ((((PyObject *)__pyx_v_self->view.obj) == NULL) != 0);
23226  if (__pyx_t_1) {
23227 
23228  /* "View.MemoryView":351
23229  * __Pyx_GetBuffer(obj, &self.view, flags)
23230  * if <PyObject *> self.view.obj == NULL:
23231  * (<__pyx_buffer *> &self.view).obj = Py_None # <<<<<<<<<<<<<<
23232  * Py_INCREF(Py_None)
23233  *
23234  */
23235  ((Py_buffer *)(&__pyx_v_self->view))->obj = Py_None;
23236 
23237  /* "View.MemoryView":352
23238  * if <PyObject *> self.view.obj == NULL:
23239  * (<__pyx_buffer *> &self.view).obj = Py_None
23240  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
23241  *
23242  * global __pyx_memoryview_thread_locks_used
23243  */
23244  Py_INCREF(Py_None);
23245 
23246  /* "View.MemoryView":350
23247  * if type(self) is memoryview or obj is not None:
23248  * __Pyx_GetBuffer(obj, &self.view, flags)
23249  * if <PyObject *> self.view.obj == NULL: # <<<<<<<<<<<<<<
23250  * (<__pyx_buffer *> &self.view).obj = Py_None
23251  * Py_INCREF(Py_None)
23252  */
23253  }
23254 
23255  /* "View.MemoryView":348
23256  * self.obj = obj
23257  * self.flags = flags
23258  * if type(self) is memoryview or obj is not None: # <<<<<<<<<<<<<<
23259  * __Pyx_GetBuffer(obj, &self.view, flags)
23260  * if <PyObject *> self.view.obj == NULL:
23261  */
23262  }
23263 
23264  /* "View.MemoryView":355
23265  *
23266  * global __pyx_memoryview_thread_locks_used
23267  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
23268  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
23269  * __pyx_memoryview_thread_locks_used += 1
23270  */
23271  __pyx_t_1 = ((__pyx_memoryview_thread_locks_used < 8) != 0);
23272  if (__pyx_t_1) {
23273 
23274  /* "View.MemoryView":356
23275  * global __pyx_memoryview_thread_locks_used
23276  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
23277  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] # <<<<<<<<<<<<<<
23278  * __pyx_memoryview_thread_locks_used += 1
23279  * if self.lock is NULL:
23280  */
23281  __pyx_v_self->lock = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
23282 
23283  /* "View.MemoryView":357
23284  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED:
23285  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
23286  * __pyx_memoryview_thread_locks_used += 1 # <<<<<<<<<<<<<<
23287  * if self.lock is NULL:
23288  * self.lock = PyThread_allocate_lock()
23289  */
23290  __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used + 1);
23291 
23292  /* "View.MemoryView":355
23293  *
23294  * global __pyx_memoryview_thread_locks_used
23295  * if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: # <<<<<<<<<<<<<<
23296  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
23297  * __pyx_memoryview_thread_locks_used += 1
23298  */
23299  }
23300 
23301  /* "View.MemoryView":358
23302  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
23303  * __pyx_memoryview_thread_locks_used += 1
23304  * if self.lock is NULL: # <<<<<<<<<<<<<<
23305  * self.lock = PyThread_allocate_lock()
23306  * if self.lock is NULL:
23307  */
23308  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
23309  if (__pyx_t_1) {
23310 
23311  /* "View.MemoryView":359
23312  * __pyx_memoryview_thread_locks_used += 1
23313  * if self.lock is NULL:
23314  * self.lock = PyThread_allocate_lock() # <<<<<<<<<<<<<<
23315  * if self.lock is NULL:
23316  * raise MemoryError
23317  */
23318  __pyx_v_self->lock = PyThread_allocate_lock();
23319 
23320  /* "View.MemoryView":360
23321  * if self.lock is NULL:
23322  * self.lock = PyThread_allocate_lock()
23323  * if self.lock is NULL: # <<<<<<<<<<<<<<
23324  * raise MemoryError
23325  *
23326  */
23327  __pyx_t_1 = ((__pyx_v_self->lock == NULL) != 0);
23328  if (unlikely(__pyx_t_1)) {
23329 
23330  /* "View.MemoryView":361
23331  * self.lock = PyThread_allocate_lock()
23332  * if self.lock is NULL:
23333  * raise MemoryError # <<<<<<<<<<<<<<
23334  *
23335  * if flags & PyBUF_FORMAT:
23336  */
23337  PyErr_NoMemory(); __PYX_ERR(0, 361, __pyx_L1_error)
23338 
23339  /* "View.MemoryView":360
23340  * if self.lock is NULL:
23341  * self.lock = PyThread_allocate_lock()
23342  * if self.lock is NULL: # <<<<<<<<<<<<<<
23343  * raise MemoryError
23344  *
23345  */
23346  }
23347 
23348  /* "View.MemoryView":358
23349  * self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]
23350  * __pyx_memoryview_thread_locks_used += 1
23351  * if self.lock is NULL: # <<<<<<<<<<<<<<
23352  * self.lock = PyThread_allocate_lock()
23353  * if self.lock is NULL:
23354  */
23355  }
23356 
23357  /* "View.MemoryView":363
23358  * raise MemoryError
23359  *
23360  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
23361  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
23362  * else:
23363  */
23364  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
23365  if (__pyx_t_1) {
23366 
23367  /* "View.MemoryView":364
23368  *
23369  * if flags & PyBUF_FORMAT:
23370  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') # <<<<<<<<<<<<<<
23371  * else:
23372  * self.dtype_is_object = dtype_is_object
23373  */
23374  __pyx_t_2 = (((__pyx_v_self->view.format[0]) == 'O') != 0);
23375  if (__pyx_t_2) {
23376  } else {
23377  __pyx_t_1 = __pyx_t_2;
23378  goto __pyx_L11_bool_binop_done;
23379  }
23380  __pyx_t_2 = (((__pyx_v_self->view.format[1]) == '\x00') != 0);
23381  __pyx_t_1 = __pyx_t_2;
23382  __pyx_L11_bool_binop_done:;
23383  __pyx_v_self->dtype_is_object = __pyx_t_1;
23384 
23385  /* "View.MemoryView":363
23386  * raise MemoryError
23387  *
23388  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
23389  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
23390  * else:
23391  */
23392  goto __pyx_L10;
23393  }
23394 
23395  /* "View.MemoryView":366
23396  * self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0')
23397  * else:
23398  * self.dtype_is_object = dtype_is_object # <<<<<<<<<<<<<<
23399  *
23400  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
23401  */
23402  /*else*/ {
23403  __pyx_v_self->dtype_is_object = __pyx_v_dtype_is_object;
23404  }
23405  __pyx_L10:;
23406 
23407  /* "View.MemoryView":368
23408  * self.dtype_is_object = dtype_is_object
23409  *
23410  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( # <<<<<<<<<<<<<<
23411  * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
23412  * self.typeinfo = NULL
23413  */
23414  __pyx_v_self->acquisition_count_aligned_p = ((__pyx_atomic_int *)__pyx_align_pointer(((void *)(&(__pyx_v_self->acquisition_count[0]))), (sizeof(__pyx_atomic_int))));
23415 
23416  /* "View.MemoryView":370
23417  * self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer(
23418  * <void *> &self.acquisition_count[0], sizeof(__pyx_atomic_int))
23419  * self.typeinfo = NULL # <<<<<<<<<<<<<<
23420  *
23421  * def __dealloc__(memoryview self):
23422  */
23423  __pyx_v_self->typeinfo = NULL;
23424 
23425  /* "View.MemoryView":345
23426  * cdef __Pyx_TypeInfo *typeinfo
23427  *
23428  * def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): # <<<<<<<<<<<<<<
23429  * self.obj = obj
23430  * self.flags = flags
23431  */
23432 
23433  /* function exit code */
23434  __pyx_r = 0;
23435  goto __pyx_L0;
23436  __pyx_L1_error:;
23437  __Pyx_AddTraceback("View.MemoryView.memoryview.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23438  __pyx_r = -1;
23439  __pyx_L0:;
23440  __Pyx_RefNannyFinishContext();
23441  return __pyx_r;
23442 }
23443 
23444 /* "View.MemoryView":372
23445  * self.typeinfo = NULL
23446  *
23447  * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
23448  * if self.obj is not None:
23449  * __Pyx_ReleaseBuffer(&self.view)
23450  */
23451 
23452 /* Python wrapper */
23453 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self); /*proto*/
23454 static void __pyx_memoryview___dealloc__(PyObject *__pyx_v_self) {
23455  __Pyx_RefNannyDeclarations
23456  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
23457  __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(((struct __pyx_memoryview_obj *)__pyx_v_self));
23458 
23459  /* function exit code */
23460  __Pyx_RefNannyFinishContext();
23461 }
23462 
23463 static void __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_2__dealloc__(struct __pyx_memoryview_obj *__pyx_v_self) {
23464  int __pyx_v_i;
23465  __Pyx_RefNannyDeclarations
23466  int __pyx_t_1;
23467  int __pyx_t_2;
23468  int __pyx_t_3;
23469  int __pyx_t_4;
23470  int __pyx_t_5;
23471  PyThread_type_lock __pyx_t_6;
23472  PyThread_type_lock __pyx_t_7;
23473  __Pyx_RefNannySetupContext("__dealloc__", 0);
23474 
23475  /* "View.MemoryView":373
23476  *
23477  * def __dealloc__(memoryview self):
23478  * if self.obj is not None: # <<<<<<<<<<<<<<
23479  * __Pyx_ReleaseBuffer(&self.view)
23480  *
23481  */
23482  __pyx_t_1 = (__pyx_v_self->obj != Py_None);
23483  __pyx_t_2 = (__pyx_t_1 != 0);
23484  if (__pyx_t_2) {
23485 
23486  /* "View.MemoryView":374
23487  * def __dealloc__(memoryview self):
23488  * if self.obj is not None:
23489  * __Pyx_ReleaseBuffer(&self.view) # <<<<<<<<<<<<<<
23490  *
23491  * cdef int i
23492  */
23493  __Pyx_ReleaseBuffer((&__pyx_v_self->view));
23494 
23495  /* "View.MemoryView":373
23496  *
23497  * def __dealloc__(memoryview self):
23498  * if self.obj is not None: # <<<<<<<<<<<<<<
23499  * __Pyx_ReleaseBuffer(&self.view)
23500  *
23501  */
23502  }
23503 
23504  /* "View.MemoryView":378
23505  * cdef int i
23506  * global __pyx_memoryview_thread_locks_used
23507  * if self.lock != NULL: # <<<<<<<<<<<<<<
23508  * for i in range(__pyx_memoryview_thread_locks_used):
23509  * if __pyx_memoryview_thread_locks[i] is self.lock:
23510  */
23511  __pyx_t_2 = ((__pyx_v_self->lock != NULL) != 0);
23512  if (__pyx_t_2) {
23513 
23514  /* "View.MemoryView":379
23515  * global __pyx_memoryview_thread_locks_used
23516  * if self.lock != NULL:
23517  * for i in range(__pyx_memoryview_thread_locks_used): # <<<<<<<<<<<<<<
23518  * if __pyx_memoryview_thread_locks[i] is self.lock:
23519  * __pyx_memoryview_thread_locks_used -= 1
23520  */
23521  __pyx_t_3 = __pyx_memoryview_thread_locks_used;
23522  __pyx_t_4 = __pyx_t_3;
23523  for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
23524  __pyx_v_i = __pyx_t_5;
23525 
23526  /* "View.MemoryView":380
23527  * if self.lock != NULL:
23528  * for i in range(__pyx_memoryview_thread_locks_used):
23529  * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
23530  * __pyx_memoryview_thread_locks_used -= 1
23531  * if i != __pyx_memoryview_thread_locks_used:
23532  */
23533  __pyx_t_2 = (((__pyx_memoryview_thread_locks[__pyx_v_i]) == __pyx_v_self->lock) != 0);
23534  if (__pyx_t_2) {
23535 
23536  /* "View.MemoryView":381
23537  * for i in range(__pyx_memoryview_thread_locks_used):
23538  * if __pyx_memoryview_thread_locks[i] is self.lock:
23539  * __pyx_memoryview_thread_locks_used -= 1 # <<<<<<<<<<<<<<
23540  * if i != __pyx_memoryview_thread_locks_used:
23541  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
23542  */
23543  __pyx_memoryview_thread_locks_used = (__pyx_memoryview_thread_locks_used - 1);
23544 
23545  /* "View.MemoryView":382
23546  * if __pyx_memoryview_thread_locks[i] is self.lock:
23547  * __pyx_memoryview_thread_locks_used -= 1
23548  * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
23549  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
23550  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
23551  */
23552  __pyx_t_2 = ((__pyx_v_i != __pyx_memoryview_thread_locks_used) != 0);
23553  if (__pyx_t_2) {
23554 
23555  /* "View.MemoryView":384
23556  * if i != __pyx_memoryview_thread_locks_used:
23557  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
23558  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) # <<<<<<<<<<<<<<
23559  * break
23560  * else:
23561  */
23562  __pyx_t_6 = (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]);
23563  __pyx_t_7 = (__pyx_memoryview_thread_locks[__pyx_v_i]);
23564 
23565  /* "View.MemoryView":383
23566  * __pyx_memoryview_thread_locks_used -= 1
23567  * if i != __pyx_memoryview_thread_locks_used:
23568  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( # <<<<<<<<<<<<<<
23569  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
23570  * break
23571  */
23572  (__pyx_memoryview_thread_locks[__pyx_v_i]) = __pyx_t_6;
23573  (__pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used]) = __pyx_t_7;
23574 
23575  /* "View.MemoryView":382
23576  * if __pyx_memoryview_thread_locks[i] is self.lock:
23577  * __pyx_memoryview_thread_locks_used -= 1
23578  * if i != __pyx_memoryview_thread_locks_used: # <<<<<<<<<<<<<<
23579  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
23580  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
23581  */
23582  }
23583 
23584  /* "View.MemoryView":385
23585  * __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = (
23586  * __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i])
23587  * break # <<<<<<<<<<<<<<
23588  * else:
23589  * PyThread_free_lock(self.lock)
23590  */
23591  goto __pyx_L6_break;
23592 
23593  /* "View.MemoryView":380
23594  * if self.lock != NULL:
23595  * for i in range(__pyx_memoryview_thread_locks_used):
23596  * if __pyx_memoryview_thread_locks[i] is self.lock: # <<<<<<<<<<<<<<
23597  * __pyx_memoryview_thread_locks_used -= 1
23598  * if i != __pyx_memoryview_thread_locks_used:
23599  */
23600  }
23601  }
23602  /*else*/ {
23603 
23604  /* "View.MemoryView":387
23605  * break
23606  * else:
23607  * PyThread_free_lock(self.lock) # <<<<<<<<<<<<<<
23608  *
23609  * cdef char *get_item_pointer(memoryview self, object index) except NULL:
23610  */
23611  PyThread_free_lock(__pyx_v_self->lock);
23612  }
23613  __pyx_L6_break:;
23614 
23615  /* "View.MemoryView":378
23616  * cdef int i
23617  * global __pyx_memoryview_thread_locks_used
23618  * if self.lock != NULL: # <<<<<<<<<<<<<<
23619  * for i in range(__pyx_memoryview_thread_locks_used):
23620  * if __pyx_memoryview_thread_locks[i] is self.lock:
23621  */
23622  }
23623 
23624  /* "View.MemoryView":372
23625  * self.typeinfo = NULL
23626  *
23627  * def __dealloc__(memoryview self): # <<<<<<<<<<<<<<
23628  * if self.obj is not None:
23629  * __Pyx_ReleaseBuffer(&self.view)
23630  */
23631 
23632  /* function exit code */
23633  __Pyx_RefNannyFinishContext();
23634 }
23635 
23636 /* "View.MemoryView":389
23637  * PyThread_free_lock(self.lock)
23638  *
23639  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
23640  * cdef Py_ssize_t dim
23641  * cdef char *itemp = <char *> self.view.buf
23642  */
23643 
23644 static char *__pyx_memoryview_get_item_pointer(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
23645  Py_ssize_t __pyx_v_dim;
23646  char *__pyx_v_itemp;
23647  PyObject *__pyx_v_idx = NULL;
23648  char *__pyx_r;
23649  __Pyx_RefNannyDeclarations
23650  Py_ssize_t __pyx_t_1;
23651  PyObject *__pyx_t_2 = NULL;
23652  Py_ssize_t __pyx_t_3;
23653  PyObject *(*__pyx_t_4)(PyObject *);
23654  PyObject *__pyx_t_5 = NULL;
23655  Py_ssize_t __pyx_t_6;
23656  char *__pyx_t_7;
23657  __Pyx_RefNannySetupContext("get_item_pointer", 0);
23658 
23659  /* "View.MemoryView":391
23660  * cdef char *get_item_pointer(memoryview self, object index) except NULL:
23661  * cdef Py_ssize_t dim
23662  * cdef char *itemp = <char *> self.view.buf # <<<<<<<<<<<<<<
23663  *
23664  * for dim, idx in enumerate(index):
23665  */
23666  __pyx_v_itemp = ((char *)__pyx_v_self->view.buf);
23667 
23668  /* "View.MemoryView":393
23669  * cdef char *itemp = <char *> self.view.buf
23670  *
23671  * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
23672  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
23673  *
23674  */
23675  __pyx_t_1 = 0;
23676  if (likely(PyList_CheckExact(__pyx_v_index)) || PyTuple_CheckExact(__pyx_v_index)) {
23677  __pyx_t_2 = __pyx_v_index; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
23678  __pyx_t_4 = NULL;
23679  } else {
23680  __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error)
23681  __Pyx_GOTREF(__pyx_t_2);
23682  __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 393, __pyx_L1_error)
23683  }
23684  for (;;) {
23685  if (likely(!__pyx_t_4)) {
23686  if (likely(PyList_CheckExact(__pyx_t_2))) {
23687  if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
23688  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23689  __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 393, __pyx_L1_error)
23690  #else
23691  __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 393, __pyx_L1_error)
23692  __Pyx_GOTREF(__pyx_t_5);
23693  #endif
23694  } else {
23695  if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
23696  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23697  __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 393, __pyx_L1_error)
23698  #else
23699  __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 393, __pyx_L1_error)
23700  __Pyx_GOTREF(__pyx_t_5);
23701  #endif
23702  }
23703  } else {
23704  __pyx_t_5 = __pyx_t_4(__pyx_t_2);
23705  if (unlikely(!__pyx_t_5)) {
23706  PyObject* exc_type = PyErr_Occurred();
23707  if (exc_type) {
23708  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
23709  else __PYX_ERR(0, 393, __pyx_L1_error)
23710  }
23711  break;
23712  }
23713  __Pyx_GOTREF(__pyx_t_5);
23714  }
23715  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_5);
23716  __pyx_t_5 = 0;
23717  __pyx_v_dim = __pyx_t_1;
23718  __pyx_t_1 = (__pyx_t_1 + 1);
23719 
23720  /* "View.MemoryView":394
23721  *
23722  * for dim, idx in enumerate(index):
23723  * itemp = pybuffer_index(&self.view, itemp, idx, dim) # <<<<<<<<<<<<<<
23724  *
23725  * return itemp
23726  */
23727  __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_v_idx); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 394, __pyx_L1_error)
23728  __pyx_t_7 = __pyx_pybuffer_index((&__pyx_v_self->view), __pyx_v_itemp, __pyx_t_6, __pyx_v_dim); if (unlikely(__pyx_t_7 == ((char *)NULL))) __PYX_ERR(0, 394, __pyx_L1_error)
23729  __pyx_v_itemp = __pyx_t_7;
23730 
23731  /* "View.MemoryView":393
23732  * cdef char *itemp = <char *> self.view.buf
23733  *
23734  * for dim, idx in enumerate(index): # <<<<<<<<<<<<<<
23735  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
23736  *
23737  */
23738  }
23739  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
23740 
23741  /* "View.MemoryView":396
23742  * itemp = pybuffer_index(&self.view, itemp, idx, dim)
23743  *
23744  * return itemp # <<<<<<<<<<<<<<
23745  *
23746  *
23747  */
23748  __pyx_r = __pyx_v_itemp;
23749  goto __pyx_L0;
23750 
23751  /* "View.MemoryView":389
23752  * PyThread_free_lock(self.lock)
23753  *
23754  * cdef char *get_item_pointer(memoryview self, object index) except NULL: # <<<<<<<<<<<<<<
23755  * cdef Py_ssize_t dim
23756  * cdef char *itemp = <char *> self.view.buf
23757  */
23758 
23759  /* function exit code */
23760  __pyx_L1_error:;
23761  __Pyx_XDECREF(__pyx_t_2);
23762  __Pyx_XDECREF(__pyx_t_5);
23763  __Pyx_AddTraceback("View.MemoryView.memoryview.get_item_pointer", __pyx_clineno, __pyx_lineno, __pyx_filename);
23764  __pyx_r = NULL;
23765  __pyx_L0:;
23766  __Pyx_XDECREF(__pyx_v_idx);
23767  __Pyx_RefNannyFinishContext();
23768  return __pyx_r;
23769 }
23770 
23771 /* "View.MemoryView":399
23772  *
23773  *
23774  * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
23775  * if index is Ellipsis:
23776  * return self
23777  */
23778 
23779 /* Python wrapper */
23780 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index); /*proto*/
23781 static PyObject *__pyx_memoryview___getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index) {
23782  PyObject *__pyx_r = 0;
23783  __Pyx_RefNannyDeclarations
23784  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
23785  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index));
23786 
23787  /* function exit code */
23788  __Pyx_RefNannyFinishContext();
23789  return __pyx_r;
23790 }
23791 
23792 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_4__getitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index) {
23793  PyObject *__pyx_v_have_slices = NULL;
23794  PyObject *__pyx_v_indices = NULL;
23795  char *__pyx_v_itemp;
23796  PyObject *__pyx_r = NULL;
23797  __Pyx_RefNannyDeclarations
23798  int __pyx_t_1;
23799  int __pyx_t_2;
23800  PyObject *__pyx_t_3 = NULL;
23801  PyObject *__pyx_t_4 = NULL;
23802  PyObject *__pyx_t_5 = NULL;
23803  char *__pyx_t_6;
23804  __Pyx_RefNannySetupContext("__getitem__", 0);
23805 
23806  /* "View.MemoryView":400
23807  *
23808  * def __getitem__(memoryview self, object index):
23809  * if index is Ellipsis: # <<<<<<<<<<<<<<
23810  * return self
23811  *
23812  */
23813  __pyx_t_1 = (__pyx_v_index == __pyx_builtin_Ellipsis);
23814  __pyx_t_2 = (__pyx_t_1 != 0);
23815  if (__pyx_t_2) {
23816 
23817  /* "View.MemoryView":401
23818  * def __getitem__(memoryview self, object index):
23819  * if index is Ellipsis:
23820  * return self # <<<<<<<<<<<<<<
23821  *
23822  * have_slices, indices = _unellipsify(index, self.view.ndim)
23823  */
23824  __Pyx_XDECREF(__pyx_r);
23825  __Pyx_INCREF(((PyObject *)__pyx_v_self));
23826  __pyx_r = ((PyObject *)__pyx_v_self);
23827  goto __pyx_L0;
23828 
23829  /* "View.MemoryView":400
23830  *
23831  * def __getitem__(memoryview self, object index):
23832  * if index is Ellipsis: # <<<<<<<<<<<<<<
23833  * return self
23834  *
23835  */
23836  }
23837 
23838  /* "View.MemoryView":403
23839  * return self
23840  *
23841  * have_slices, indices = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
23842  *
23843  * cdef char *itemp
23844  */
23845  __pyx_t_3 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
23846  __Pyx_GOTREF(__pyx_t_3);
23847  if (likely(__pyx_t_3 != Py_None)) {
23848  PyObject* sequence = __pyx_t_3;
23849  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
23850  if (unlikely(size != 2)) {
23851  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
23852  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
23853  __PYX_ERR(0, 403, __pyx_L1_error)
23854  }
23855  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
23856  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
23857  __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
23858  __Pyx_INCREF(__pyx_t_4);
23859  __Pyx_INCREF(__pyx_t_5);
23860  #else
23861  __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __pyx_L1_error)
23862  __Pyx_GOTREF(__pyx_t_4);
23863  __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 403, __pyx_L1_error)
23864  __Pyx_GOTREF(__pyx_t_5);
23865  #endif
23866  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
23867  } else {
23868  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 403, __pyx_L1_error)
23869  }
23870  __pyx_v_have_slices = __pyx_t_4;
23871  __pyx_t_4 = 0;
23872  __pyx_v_indices = __pyx_t_5;
23873  __pyx_t_5 = 0;
23874 
23875  /* "View.MemoryView":406
23876  *
23877  * cdef char *itemp
23878  * if have_slices: # <<<<<<<<<<<<<<
23879  * return memview_slice(self, indices)
23880  * else:
23881  */
23882  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 406, __pyx_L1_error)
23883  if (__pyx_t_2) {
23884 
23885  /* "View.MemoryView":407
23886  * cdef char *itemp
23887  * if have_slices:
23888  * return memview_slice(self, indices) # <<<<<<<<<<<<<<
23889  * else:
23890  * itemp = self.get_item_pointer(indices)
23891  */
23892  __Pyx_XDECREF(__pyx_r);
23893  __pyx_t_3 = ((PyObject *)__pyx_memview_slice(__pyx_v_self, __pyx_v_indices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 407, __pyx_L1_error)
23894  __Pyx_GOTREF(__pyx_t_3);
23895  __pyx_r = __pyx_t_3;
23896  __pyx_t_3 = 0;
23897  goto __pyx_L0;
23898 
23899  /* "View.MemoryView":406
23900  *
23901  * cdef char *itemp
23902  * if have_slices: # <<<<<<<<<<<<<<
23903  * return memview_slice(self, indices)
23904  * else:
23905  */
23906  }
23907 
23908  /* "View.MemoryView":409
23909  * return memview_slice(self, indices)
23910  * else:
23911  * itemp = self.get_item_pointer(indices) # <<<<<<<<<<<<<<
23912  * return self.convert_item_to_object(itemp)
23913  *
23914  */
23915  /*else*/ {
23916  __pyx_t_6 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_indices); if (unlikely(__pyx_t_6 == ((char *)NULL))) __PYX_ERR(0, 409, __pyx_L1_error)
23917  __pyx_v_itemp = __pyx_t_6;
23918 
23919  /* "View.MemoryView":410
23920  * else:
23921  * itemp = self.get_item_pointer(indices)
23922  * return self.convert_item_to_object(itemp) # <<<<<<<<<<<<<<
23923  *
23924  * def __setitem__(memoryview self, object index, object value):
23925  */
23926  __Pyx_XDECREF(__pyx_r);
23927  __pyx_t_3 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->convert_item_to_object(__pyx_v_self, __pyx_v_itemp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 410, __pyx_L1_error)
23928  __Pyx_GOTREF(__pyx_t_3);
23929  __pyx_r = __pyx_t_3;
23930  __pyx_t_3 = 0;
23931  goto __pyx_L0;
23932  }
23933 
23934  /* "View.MemoryView":399
23935  *
23936  *
23937  * def __getitem__(memoryview self, object index): # <<<<<<<<<<<<<<
23938  * if index is Ellipsis:
23939  * return self
23940  */
23941 
23942  /* function exit code */
23943  __pyx_L1_error:;
23944  __Pyx_XDECREF(__pyx_t_3);
23945  __Pyx_XDECREF(__pyx_t_4);
23946  __Pyx_XDECREF(__pyx_t_5);
23947  __Pyx_AddTraceback("View.MemoryView.memoryview.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
23948  __pyx_r = NULL;
23949  __pyx_L0:;
23950  __Pyx_XDECREF(__pyx_v_have_slices);
23951  __Pyx_XDECREF(__pyx_v_indices);
23952  __Pyx_XGIVEREF(__pyx_r);
23953  __Pyx_RefNannyFinishContext();
23954  return __pyx_r;
23955 }
23956 
23957 /* "View.MemoryView":412
23958  * return self.convert_item_to_object(itemp)
23959  *
23960  * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
23961  * if self.view.readonly:
23962  * raise TypeError("Cannot assign to read-only memoryview")
23963  */
23964 
23965 /* Python wrapper */
23966 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
23967 static int __pyx_memoryview___setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
23968  int __pyx_r;
23969  __Pyx_RefNannyDeclarations
23970  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
23971  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v_index), ((PyObject *)__pyx_v_value));
23972 
23973  /* function exit code */
23974  __Pyx_RefNannyFinishContext();
23975  return __pyx_r;
23976 }
23977 
23978 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_6__setitem__(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
23979  PyObject *__pyx_v_have_slices = NULL;
23980  PyObject *__pyx_v_obj = NULL;
23981  int __pyx_r;
23982  __Pyx_RefNannyDeclarations
23983  int __pyx_t_1;
23984  PyObject *__pyx_t_2 = NULL;
23985  PyObject *__pyx_t_3 = NULL;
23986  PyObject *__pyx_t_4 = NULL;
23987  __Pyx_RefNannySetupContext("__setitem__", 0);
23988  __Pyx_INCREF(__pyx_v_index);
23989 
23990  /* "View.MemoryView":413
23991  *
23992  * def __setitem__(memoryview self, object index, object value):
23993  * if self.view.readonly: # <<<<<<<<<<<<<<
23994  * raise TypeError("Cannot assign to read-only memoryview")
23995  *
23996  */
23997  __pyx_t_1 = (__pyx_v_self->view.readonly != 0);
23998  if (unlikely(__pyx_t_1)) {
23999 
24000  /* "View.MemoryView":414
24001  * def __setitem__(memoryview self, object index, object value):
24002  * if self.view.readonly:
24003  * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
24004  *
24005  * have_slices, index = _unellipsify(index, self.view.ndim)
24006  */
24007  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
24008  __Pyx_GOTREF(__pyx_t_2);
24009  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
24010  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24011  __PYX_ERR(0, 414, __pyx_L1_error)
24012 
24013  /* "View.MemoryView":413
24014  *
24015  * def __setitem__(memoryview self, object index, object value):
24016  * if self.view.readonly: # <<<<<<<<<<<<<<
24017  * raise TypeError("Cannot assign to read-only memoryview")
24018  *
24019  */
24020  }
24021 
24022  /* "View.MemoryView":416
24023  * raise TypeError("Cannot assign to read-only memoryview")
24024  *
24025  * have_slices, index = _unellipsify(index, self.view.ndim) # <<<<<<<<<<<<<<
24026  *
24027  * if have_slices:
24028  */
24029  __pyx_t_2 = _unellipsify(__pyx_v_index, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
24030  __Pyx_GOTREF(__pyx_t_2);
24031  if (likely(__pyx_t_2 != Py_None)) {
24032  PyObject* sequence = __pyx_t_2;
24033  Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
24034  if (unlikely(size != 2)) {
24035  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
24036  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
24037  __PYX_ERR(0, 416, __pyx_L1_error)
24038  }
24039  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
24040  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
24041  __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
24042  __Pyx_INCREF(__pyx_t_3);
24043  __Pyx_INCREF(__pyx_t_4);
24044  #else
24045  __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __pyx_L1_error)
24046  __Pyx_GOTREF(__pyx_t_3);
24047  __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L1_error)
24048  __Pyx_GOTREF(__pyx_t_4);
24049  #endif
24050  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24051  } else {
24052  __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 416, __pyx_L1_error)
24053  }
24054  __pyx_v_have_slices = __pyx_t_3;
24055  __pyx_t_3 = 0;
24056  __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_4);
24057  __pyx_t_4 = 0;
24058 
24059  /* "View.MemoryView":418
24060  * have_slices, index = _unellipsify(index, self.view.ndim)
24061  *
24062  * if have_slices: # <<<<<<<<<<<<<<
24063  * obj = self.is_slice(value)
24064  * if obj:
24065  */
24066  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_have_slices); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 418, __pyx_L1_error)
24067  if (__pyx_t_1) {
24068 
24069  /* "View.MemoryView":419
24070  *
24071  * if have_slices:
24072  * obj = self.is_slice(value) # <<<<<<<<<<<<<<
24073  * if obj:
24074  * self.setitem_slice_assignment(self[index], obj)
24075  */
24076  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->is_slice(__pyx_v_self, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 419, __pyx_L1_error)
24077  __Pyx_GOTREF(__pyx_t_2);
24078  __pyx_v_obj = __pyx_t_2;
24079  __pyx_t_2 = 0;
24080 
24081  /* "View.MemoryView":420
24082  * if have_slices:
24083  * obj = self.is_slice(value)
24084  * if obj: # <<<<<<<<<<<<<<
24085  * self.setitem_slice_assignment(self[index], obj)
24086  * else:
24087  */
24088  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_obj); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 420, __pyx_L1_error)
24089  if (__pyx_t_1) {
24090 
24091  /* "View.MemoryView":421
24092  * obj = self.is_slice(value)
24093  * if obj:
24094  * self.setitem_slice_assignment(self[index], obj) # <<<<<<<<<<<<<<
24095  * else:
24096  * self.setitem_slice_assign_scalar(self[index], value)
24097  */
24098  __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error)
24099  __Pyx_GOTREF(__pyx_t_2);
24100  __pyx_t_4 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assignment(__pyx_v_self, __pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 421, __pyx_L1_error)
24101  __Pyx_GOTREF(__pyx_t_4);
24102  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24103  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24104 
24105  /* "View.MemoryView":420
24106  * if have_slices:
24107  * obj = self.is_slice(value)
24108  * if obj: # <<<<<<<<<<<<<<
24109  * self.setitem_slice_assignment(self[index], obj)
24110  * else:
24111  */
24112  goto __pyx_L5;
24113  }
24114 
24115  /* "View.MemoryView":423
24116  * self.setitem_slice_assignment(self[index], obj)
24117  * else:
24118  * self.setitem_slice_assign_scalar(self[index], value) # <<<<<<<<<<<<<<
24119  * else:
24120  * self.setitem_indexed(index, value)
24121  */
24122  /*else*/ {
24123  __pyx_t_4 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_self), __pyx_v_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error)
24124  __Pyx_GOTREF(__pyx_t_4);
24125  if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_memoryview_type))))) __PYX_ERR(0, 423, __pyx_L1_error)
24126  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_slice_assign_scalar(__pyx_v_self, ((struct __pyx_memoryview_obj *)__pyx_t_4), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error)
24127  __Pyx_GOTREF(__pyx_t_2);
24128  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
24129  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24130  }
24131  __pyx_L5:;
24132 
24133  /* "View.MemoryView":418
24134  * have_slices, index = _unellipsify(index, self.view.ndim)
24135  *
24136  * if have_slices: # <<<<<<<<<<<<<<
24137  * obj = self.is_slice(value)
24138  * if obj:
24139  */
24140  goto __pyx_L4;
24141  }
24142 
24143  /* "View.MemoryView":425
24144  * self.setitem_slice_assign_scalar(self[index], value)
24145  * else:
24146  * self.setitem_indexed(index, value) # <<<<<<<<<<<<<<
24147  *
24148  * cdef is_slice(self, obj):
24149  */
24150  /*else*/ {
24151  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->setitem_indexed(__pyx_v_self, __pyx_v_index, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)
24152  __Pyx_GOTREF(__pyx_t_2);
24153  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24154  }
24155  __pyx_L4:;
24156 
24157  /* "View.MemoryView":412
24158  * return self.convert_item_to_object(itemp)
24159  *
24160  * def __setitem__(memoryview self, object index, object value): # <<<<<<<<<<<<<<
24161  * if self.view.readonly:
24162  * raise TypeError("Cannot assign to read-only memoryview")
24163  */
24164 
24165  /* function exit code */
24166  __pyx_r = 0;
24167  goto __pyx_L0;
24168  __pyx_L1_error:;
24169  __Pyx_XDECREF(__pyx_t_2);
24170  __Pyx_XDECREF(__pyx_t_3);
24171  __Pyx_XDECREF(__pyx_t_4);
24172  __Pyx_AddTraceback("View.MemoryView.memoryview.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
24173  __pyx_r = -1;
24174  __pyx_L0:;
24175  __Pyx_XDECREF(__pyx_v_have_slices);
24176  __Pyx_XDECREF(__pyx_v_obj);
24177  __Pyx_XDECREF(__pyx_v_index);
24178  __Pyx_RefNannyFinishContext();
24179  return __pyx_r;
24180 }
24181 
24182 /* "View.MemoryView":427
24183  * self.setitem_indexed(index, value)
24184  *
24185  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
24186  * if not isinstance(obj, memoryview):
24187  * try:
24188  */
24189 
24190 static PyObject *__pyx_memoryview_is_slice(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_obj) {
24191  PyObject *__pyx_r = NULL;
24192  __Pyx_RefNannyDeclarations
24193  int __pyx_t_1;
24194  int __pyx_t_2;
24195  PyObject *__pyx_t_3 = NULL;
24196  PyObject *__pyx_t_4 = NULL;
24197  PyObject *__pyx_t_5 = NULL;
24198  PyObject *__pyx_t_6 = NULL;
24199  PyObject *__pyx_t_7 = NULL;
24200  PyObject *__pyx_t_8 = NULL;
24201  int __pyx_t_9;
24202  __Pyx_RefNannySetupContext("is_slice", 0);
24203  __Pyx_INCREF(__pyx_v_obj);
24204 
24205  /* "View.MemoryView":428
24206  *
24207  * cdef is_slice(self, obj):
24208  * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
24209  * try:
24210  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
24211  */
24212  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_obj, __pyx_memoryview_type);
24213  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
24214  if (__pyx_t_2) {
24215 
24216  /* "View.MemoryView":429
24217  * cdef is_slice(self, obj):
24218  * if not isinstance(obj, memoryview):
24219  * try: # <<<<<<<<<<<<<<
24220  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
24221  * self.dtype_is_object)
24222  */
24223  {
24224  __Pyx_PyThreadState_declare
24225  __Pyx_PyThreadState_assign
24226  __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
24227  __Pyx_XGOTREF(__pyx_t_3);
24228  __Pyx_XGOTREF(__pyx_t_4);
24229  __Pyx_XGOTREF(__pyx_t_5);
24230  /*try:*/ {
24231 
24232  /* "View.MemoryView":430
24233  * if not isinstance(obj, memoryview):
24234  * try:
24235  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
24236  * self.dtype_is_object)
24237  * except TypeError:
24238  */
24239  __pyx_t_6 = __Pyx_PyInt_From_int(((__pyx_v_self->flags & (~PyBUF_WRITABLE)) | PyBUF_ANY_CONTIGUOUS)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 430, __pyx_L4_error)
24240  __Pyx_GOTREF(__pyx_t_6);
24241 
24242  /* "View.MemoryView":431
24243  * try:
24244  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
24245  * self.dtype_is_object) # <<<<<<<<<<<<<<
24246  * except TypeError:
24247  * return None
24248  */
24249  __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->dtype_is_object); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 431, __pyx_L4_error)
24250  __Pyx_GOTREF(__pyx_t_7);
24251 
24252  /* "View.MemoryView":430
24253  * if not isinstance(obj, memoryview):
24254  * try:
24255  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, # <<<<<<<<<<<<<<
24256  * self.dtype_is_object)
24257  * except TypeError:
24258  */
24259  __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 430, __pyx_L4_error)
24260  __Pyx_GOTREF(__pyx_t_8);
24261  __Pyx_INCREF(__pyx_v_obj);
24262  __Pyx_GIVEREF(__pyx_v_obj);
24263  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_obj);
24264  __Pyx_GIVEREF(__pyx_t_6);
24265  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
24266  __Pyx_GIVEREF(__pyx_t_7);
24267  PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_7);
24268  __pyx_t_6 = 0;
24269  __pyx_t_7 = 0;
24270  __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 430, __pyx_L4_error)
24271  __Pyx_GOTREF(__pyx_t_7);
24272  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
24273  __Pyx_DECREF_SET(__pyx_v_obj, __pyx_t_7);
24274  __pyx_t_7 = 0;
24275 
24276  /* "View.MemoryView":429
24277  * cdef is_slice(self, obj):
24278  * if not isinstance(obj, memoryview):
24279  * try: # <<<<<<<<<<<<<<
24280  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
24281  * self.dtype_is_object)
24282  */
24283  }
24284  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
24285  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
24286  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
24287  goto __pyx_L9_try_end;
24288  __pyx_L4_error:;
24289  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
24290  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
24291  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24292 
24293  /* "View.MemoryView":432
24294  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
24295  * self.dtype_is_object)
24296  * except TypeError: # <<<<<<<<<<<<<<
24297  * return None
24298  *
24299  */
24300  __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError);
24301  if (__pyx_t_9) {
24302  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
24303  if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_8, &__pyx_t_6) < 0) __PYX_ERR(0, 432, __pyx_L6_except_error)
24304  __Pyx_GOTREF(__pyx_t_7);
24305  __Pyx_GOTREF(__pyx_t_8);
24306  __Pyx_GOTREF(__pyx_t_6);
24307 
24308  /* "View.MemoryView":433
24309  * self.dtype_is_object)
24310  * except TypeError:
24311  * return None # <<<<<<<<<<<<<<
24312  *
24313  * return obj
24314  */
24315  __Pyx_XDECREF(__pyx_r);
24316  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24317  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24318  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
24319  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
24320  goto __pyx_L7_except_return;
24321  }
24322  goto __pyx_L6_except_error;
24323  __pyx_L6_except_error:;
24324 
24325  /* "View.MemoryView":429
24326  * cdef is_slice(self, obj):
24327  * if not isinstance(obj, memoryview):
24328  * try: # <<<<<<<<<<<<<<
24329  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
24330  * self.dtype_is_object)
24331  */
24332  __Pyx_XGIVEREF(__pyx_t_3);
24333  __Pyx_XGIVEREF(__pyx_t_4);
24334  __Pyx_XGIVEREF(__pyx_t_5);
24335  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
24336  goto __pyx_L1_error;
24337  __pyx_L7_except_return:;
24338  __Pyx_XGIVEREF(__pyx_t_3);
24339  __Pyx_XGIVEREF(__pyx_t_4);
24340  __Pyx_XGIVEREF(__pyx_t_5);
24341  __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
24342  goto __pyx_L0;
24343  __pyx_L9_try_end:;
24344  }
24345 
24346  /* "View.MemoryView":428
24347  *
24348  * cdef is_slice(self, obj):
24349  * if not isinstance(obj, memoryview): # <<<<<<<<<<<<<<
24350  * try:
24351  * obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS,
24352  */
24353  }
24354 
24355  /* "View.MemoryView":435
24356  * return None
24357  *
24358  * return obj # <<<<<<<<<<<<<<
24359  *
24360  * cdef setitem_slice_assignment(self, dst, src):
24361  */
24362  __Pyx_XDECREF(__pyx_r);
24363  __Pyx_INCREF(__pyx_v_obj);
24364  __pyx_r = __pyx_v_obj;
24365  goto __pyx_L0;
24366 
24367  /* "View.MemoryView":427
24368  * self.setitem_indexed(index, value)
24369  *
24370  * cdef is_slice(self, obj): # <<<<<<<<<<<<<<
24371  * if not isinstance(obj, memoryview):
24372  * try:
24373  */
24374 
24375  /* function exit code */
24376  __pyx_L1_error:;
24377  __Pyx_XDECREF(__pyx_t_6);
24378  __Pyx_XDECREF(__pyx_t_7);
24379  __Pyx_XDECREF(__pyx_t_8);
24380  __Pyx_AddTraceback("View.MemoryView.memoryview.is_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
24381  __pyx_r = 0;
24382  __pyx_L0:;
24383  __Pyx_XDECREF(__pyx_v_obj);
24384  __Pyx_XGIVEREF(__pyx_r);
24385  __Pyx_RefNannyFinishContext();
24386  return __pyx_r;
24387 }
24388 
24389 /* "View.MemoryView":437
24390  * return obj
24391  *
24392  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
24393  * cdef __Pyx_memviewslice dst_slice
24394  * cdef __Pyx_memviewslice src_slice
24395  */
24396 
24397 static PyObject *__pyx_memoryview_setitem_slice_assignment(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_dst, PyObject *__pyx_v_src) {
24398  __Pyx_memviewslice __pyx_v_dst_slice;
24399  __Pyx_memviewslice __pyx_v_src_slice;
24400  PyObject *__pyx_r = NULL;
24401  __Pyx_RefNannyDeclarations
24402  PyObject *__pyx_t_1 = NULL;
24403  int __pyx_t_2;
24404  int __pyx_t_3;
24405  int __pyx_t_4;
24406  __Pyx_RefNannySetupContext("setitem_slice_assignment", 0);
24407 
24408  /* "View.MemoryView":441
24409  * cdef __Pyx_memviewslice src_slice
24410  *
24411  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
24412  * get_slice_from_memview(dst, &dst_slice)[0],
24413  * src.ndim, dst.ndim, self.dtype_is_object)
24414  */
24415  if (!(likely(((__pyx_v_src) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_src, __pyx_memoryview_type))))) __PYX_ERR(0, 441, __pyx_L1_error)
24416 
24417  /* "View.MemoryView":442
24418  *
24419  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
24420  * get_slice_from_memview(dst, &dst_slice)[0], # <<<<<<<<<<<<<<
24421  * src.ndim, dst.ndim, self.dtype_is_object)
24422  *
24423  */
24424  if (!(likely(((__pyx_v_dst) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_dst, __pyx_memoryview_type))))) __PYX_ERR(0, 442, __pyx_L1_error)
24425 
24426  /* "View.MemoryView":443
24427  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0],
24428  * get_slice_from_memview(dst, &dst_slice)[0],
24429  * src.ndim, dst.ndim, self.dtype_is_object) # <<<<<<<<<<<<<<
24430  *
24431  * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
24432  */
24433  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_src, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
24434  __Pyx_GOTREF(__pyx_t_1);
24435  __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 443, __pyx_L1_error)
24436  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24437  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dst, __pyx_n_s_ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
24438  __Pyx_GOTREF(__pyx_t_1);
24439  __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 443, __pyx_L1_error)
24440  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
24441 
24442  /* "View.MemoryView":441
24443  * cdef __Pyx_memviewslice src_slice
24444  *
24445  * memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], # <<<<<<<<<<<<<<
24446  * get_slice_from_memview(dst, &dst_slice)[0],
24447  * src.ndim, dst.ndim, self.dtype_is_object)
24448  */
24449  __pyx_t_4 = __pyx_memoryview_copy_contents((__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_src), (&__pyx_v_src_slice))[0]), (__pyx_memoryview_get_slice_from_memoryview(((struct __pyx_memoryview_obj *)__pyx_v_dst), (&__pyx_v_dst_slice))[0]), __pyx_t_2, __pyx_t_3, __pyx_v_self->dtype_is_object); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 441, __pyx_L1_error)
24450 
24451  /* "View.MemoryView":437
24452  * return obj
24453  *
24454  * cdef setitem_slice_assignment(self, dst, src): # <<<<<<<<<<<<<<
24455  * cdef __Pyx_memviewslice dst_slice
24456  * cdef __Pyx_memviewslice src_slice
24457  */
24458 
24459  /* function exit code */
24460  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24461  goto __pyx_L0;
24462  __pyx_L1_error:;
24463  __Pyx_XDECREF(__pyx_t_1);
24464  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assignment", __pyx_clineno, __pyx_lineno, __pyx_filename);
24465  __pyx_r = 0;
24466  __pyx_L0:;
24467  __Pyx_XGIVEREF(__pyx_r);
24468  __Pyx_RefNannyFinishContext();
24469  return __pyx_r;
24470 }
24471 
24472 /* "View.MemoryView":445
24473  * src.ndim, dst.ndim, self.dtype_is_object)
24474  *
24475  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
24476  * cdef int array[128]
24477  * cdef void *tmp = NULL
24478  */
24479 
24480 static PyObject *__pyx_memoryview_setitem_slice_assign_scalar(struct __pyx_memoryview_obj *__pyx_v_self, struct __pyx_memoryview_obj *__pyx_v_dst, PyObject *__pyx_v_value) {
24481  int __pyx_v_array[0x80];
24482  void *__pyx_v_tmp;
24483  void *__pyx_v_item;
24484  __Pyx_memviewslice *__pyx_v_dst_slice;
24485  __Pyx_memviewslice __pyx_v_tmp_slice;
24486  PyObject *__pyx_r = NULL;
24487  __Pyx_RefNannyDeclarations
24488  int __pyx_t_1;
24489  PyObject *__pyx_t_2 = NULL;
24490  int __pyx_t_3;
24491  int __pyx_t_4;
24492  char const *__pyx_t_5;
24493  PyObject *__pyx_t_6 = NULL;
24494  PyObject *__pyx_t_7 = NULL;
24495  PyObject *__pyx_t_8 = NULL;
24496  PyObject *__pyx_t_9 = NULL;
24497  PyObject *__pyx_t_10 = NULL;
24498  PyObject *__pyx_t_11 = NULL;
24499  __Pyx_RefNannySetupContext("setitem_slice_assign_scalar", 0);
24500 
24501  /* "View.MemoryView":447
24502  * cdef setitem_slice_assign_scalar(self, memoryview dst, value):
24503  * cdef int array[128]
24504  * cdef void *tmp = NULL # <<<<<<<<<<<<<<
24505  * cdef void *item
24506  *
24507  */
24508  __pyx_v_tmp = NULL;
24509 
24510  /* "View.MemoryView":452
24511  * cdef __Pyx_memviewslice *dst_slice
24512  * cdef __Pyx_memviewslice tmp_slice
24513  * dst_slice = get_slice_from_memview(dst, &tmp_slice) # <<<<<<<<<<<<<<
24514  *
24515  * if <size_t>self.view.itemsize > sizeof(array):
24516  */
24517  __pyx_v_dst_slice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_dst, (&__pyx_v_tmp_slice));
24518 
24519  /* "View.MemoryView":454
24520  * dst_slice = get_slice_from_memview(dst, &tmp_slice)
24521  *
24522  * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
24523  * tmp = PyMem_Malloc(self.view.itemsize)
24524  * if tmp == NULL:
24525  */
24526  __pyx_t_1 = ((((size_t)__pyx_v_self->view.itemsize) > (sizeof(__pyx_v_array))) != 0);
24527  if (__pyx_t_1) {
24528 
24529  /* "View.MemoryView":455
24530  *
24531  * if <size_t>self.view.itemsize > sizeof(array):
24532  * tmp = PyMem_Malloc(self.view.itemsize) # <<<<<<<<<<<<<<
24533  * if tmp == NULL:
24534  * raise MemoryError
24535  */
24536  __pyx_v_tmp = PyMem_Malloc(__pyx_v_self->view.itemsize);
24537 
24538  /* "View.MemoryView":456
24539  * if <size_t>self.view.itemsize > sizeof(array):
24540  * tmp = PyMem_Malloc(self.view.itemsize)
24541  * if tmp == NULL: # <<<<<<<<<<<<<<
24542  * raise MemoryError
24543  * item = tmp
24544  */
24545  __pyx_t_1 = ((__pyx_v_tmp == NULL) != 0);
24546  if (unlikely(__pyx_t_1)) {
24547 
24548  /* "View.MemoryView":457
24549  * tmp = PyMem_Malloc(self.view.itemsize)
24550  * if tmp == NULL:
24551  * raise MemoryError # <<<<<<<<<<<<<<
24552  * item = tmp
24553  * else:
24554  */
24555  PyErr_NoMemory(); __PYX_ERR(0, 457, __pyx_L1_error)
24556 
24557  /* "View.MemoryView":456
24558  * if <size_t>self.view.itemsize > sizeof(array):
24559  * tmp = PyMem_Malloc(self.view.itemsize)
24560  * if tmp == NULL: # <<<<<<<<<<<<<<
24561  * raise MemoryError
24562  * item = tmp
24563  */
24564  }
24565 
24566  /* "View.MemoryView":458
24567  * if tmp == NULL:
24568  * raise MemoryError
24569  * item = tmp # <<<<<<<<<<<<<<
24570  * else:
24571  * item = <void *> array
24572  */
24573  __pyx_v_item = __pyx_v_tmp;
24574 
24575  /* "View.MemoryView":454
24576  * dst_slice = get_slice_from_memview(dst, &tmp_slice)
24577  *
24578  * if <size_t>self.view.itemsize > sizeof(array): # <<<<<<<<<<<<<<
24579  * tmp = PyMem_Malloc(self.view.itemsize)
24580  * if tmp == NULL:
24581  */
24582  goto __pyx_L3;
24583  }
24584 
24585  /* "View.MemoryView":460
24586  * item = tmp
24587  * else:
24588  * item = <void *> array # <<<<<<<<<<<<<<
24589  *
24590  * try:
24591  */
24592  /*else*/ {
24593  __pyx_v_item = ((void *)__pyx_v_array);
24594  }
24595  __pyx_L3:;
24596 
24597  /* "View.MemoryView":462
24598  * item = <void *> array
24599  *
24600  * try: # <<<<<<<<<<<<<<
24601  * if self.dtype_is_object:
24602  * (<PyObject **> item)[0] = <PyObject *> value
24603  */
24604  /*try:*/ {
24605 
24606  /* "View.MemoryView":463
24607  *
24608  * try:
24609  * if self.dtype_is_object: # <<<<<<<<<<<<<<
24610  * (<PyObject **> item)[0] = <PyObject *> value
24611  * else:
24612  */
24613  __pyx_t_1 = (__pyx_v_self->dtype_is_object != 0);
24614  if (__pyx_t_1) {
24615 
24616  /* "View.MemoryView":464
24617  * try:
24618  * if self.dtype_is_object:
24619  * (<PyObject **> item)[0] = <PyObject *> value # <<<<<<<<<<<<<<
24620  * else:
24621  * self.assign_item_from_object(<char *> item, value)
24622  */
24623  (((PyObject **)__pyx_v_item)[0]) = ((PyObject *)__pyx_v_value);
24624 
24625  /* "View.MemoryView":463
24626  *
24627  * try:
24628  * if self.dtype_is_object: # <<<<<<<<<<<<<<
24629  * (<PyObject **> item)[0] = <PyObject *> value
24630  * else:
24631  */
24632  goto __pyx_L8;
24633  }
24634 
24635  /* "View.MemoryView":466
24636  * (<PyObject **> item)[0] = <PyObject *> value
24637  * else:
24638  * self.assign_item_from_object(<char *> item, value) # <<<<<<<<<<<<<<
24639  *
24640  *
24641  */
24642  /*else*/ {
24643  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, ((char *)__pyx_v_item), __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 466, __pyx_L6_error)
24644  __Pyx_GOTREF(__pyx_t_2);
24645  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24646  }
24647  __pyx_L8:;
24648 
24649  /* "View.MemoryView":470
24650  *
24651  *
24652  * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
24653  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
24654  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
24655  */
24656  __pyx_t_1 = ((__pyx_v_self->view.suboffsets != NULL) != 0);
24657  if (__pyx_t_1) {
24658 
24659  /* "View.MemoryView":471
24660  *
24661  * if self.view.suboffsets != NULL:
24662  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim) # <<<<<<<<<<<<<<
24663  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
24664  * item, self.dtype_is_object)
24665  */
24666  __pyx_t_2 = assert_direct_dimensions(__pyx_v_self->view.suboffsets, __pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L6_error)
24667  __Pyx_GOTREF(__pyx_t_2);
24668  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24669 
24670  /* "View.MemoryView":470
24671  *
24672  *
24673  * if self.view.suboffsets != NULL: # <<<<<<<<<<<<<<
24674  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
24675  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize,
24676  */
24677  }
24678 
24679  /* "View.MemoryView":472
24680  * if self.view.suboffsets != NULL:
24681  * assert_direct_dimensions(self.view.suboffsets, self.view.ndim)
24682  * slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, # <<<<<<<<<<<<<<
24683  * item, self.dtype_is_object)
24684  * finally:
24685  */
24686  __pyx_memoryview_slice_assign_scalar(__pyx_v_dst_slice, __pyx_v_dst->view.ndim, __pyx_v_self->view.itemsize, __pyx_v_item, __pyx_v_self->dtype_is_object);
24687  }
24688 
24689  /* "View.MemoryView":475
24690  * item, self.dtype_is_object)
24691  * finally:
24692  * PyMem_Free(tmp) # <<<<<<<<<<<<<<
24693  *
24694  * cdef setitem_indexed(self, index, value):
24695  */
24696  /*finally:*/ {
24697  /*normal exit:*/{
24698  PyMem_Free(__pyx_v_tmp);
24699  goto __pyx_L7;
24700  }
24701  __pyx_L6_error:;
24702  /*exception exit:*/{
24703  __Pyx_PyThreadState_declare
24704  __Pyx_PyThreadState_assign
24705  __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
24706  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
24707  if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
24708  if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
24709  __Pyx_XGOTREF(__pyx_t_6);
24710  __Pyx_XGOTREF(__pyx_t_7);
24711  __Pyx_XGOTREF(__pyx_t_8);
24712  __Pyx_XGOTREF(__pyx_t_9);
24713  __Pyx_XGOTREF(__pyx_t_10);
24714  __Pyx_XGOTREF(__pyx_t_11);
24715  __pyx_t_3 = __pyx_lineno; __pyx_t_4 = __pyx_clineno; __pyx_t_5 = __pyx_filename;
24716  {
24717  PyMem_Free(__pyx_v_tmp);
24718  }
24719  if (PY_MAJOR_VERSION >= 3) {
24720  __Pyx_XGIVEREF(__pyx_t_9);
24721  __Pyx_XGIVEREF(__pyx_t_10);
24722  __Pyx_XGIVEREF(__pyx_t_11);
24723  __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
24724  }
24725  __Pyx_XGIVEREF(__pyx_t_6);
24726  __Pyx_XGIVEREF(__pyx_t_7);
24727  __Pyx_XGIVEREF(__pyx_t_8);
24728  __Pyx_ErrRestore(__pyx_t_6, __pyx_t_7, __pyx_t_8);
24729  __pyx_t_6 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_11 = 0;
24730  __pyx_lineno = __pyx_t_3; __pyx_clineno = __pyx_t_4; __pyx_filename = __pyx_t_5;
24731  goto __pyx_L1_error;
24732  }
24733  __pyx_L7:;
24734  }
24735 
24736  /* "View.MemoryView":445
24737  * src.ndim, dst.ndim, self.dtype_is_object)
24738  *
24739  * cdef setitem_slice_assign_scalar(self, memoryview dst, value): # <<<<<<<<<<<<<<
24740  * cdef int array[128]
24741  * cdef void *tmp = NULL
24742  */
24743 
24744  /* function exit code */
24745  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24746  goto __pyx_L0;
24747  __pyx_L1_error:;
24748  __Pyx_XDECREF(__pyx_t_2);
24749  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_slice_assign_scalar", __pyx_clineno, __pyx_lineno, __pyx_filename);
24750  __pyx_r = 0;
24751  __pyx_L0:;
24752  __Pyx_XGIVEREF(__pyx_r);
24753  __Pyx_RefNannyFinishContext();
24754  return __pyx_r;
24755 }
24756 
24757 /* "View.MemoryView":477
24758  * PyMem_Free(tmp)
24759  *
24760  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
24761  * cdef char *itemp = self.get_item_pointer(index)
24762  * self.assign_item_from_object(itemp, value)
24763  */
24764 
24765 static PyObject *__pyx_memoryview_setitem_indexed(struct __pyx_memoryview_obj *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
24766  char *__pyx_v_itemp;
24767  PyObject *__pyx_r = NULL;
24768  __Pyx_RefNannyDeclarations
24769  char *__pyx_t_1;
24770  PyObject *__pyx_t_2 = NULL;
24771  __Pyx_RefNannySetupContext("setitem_indexed", 0);
24772 
24773  /* "View.MemoryView":478
24774  *
24775  * cdef setitem_indexed(self, index, value):
24776  * cdef char *itemp = self.get_item_pointer(index) # <<<<<<<<<<<<<<
24777  * self.assign_item_from_object(itemp, value)
24778  *
24779  */
24780  __pyx_t_1 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->get_item_pointer(__pyx_v_self, __pyx_v_index); if (unlikely(__pyx_t_1 == ((char *)NULL))) __PYX_ERR(0, 478, __pyx_L1_error)
24781  __pyx_v_itemp = __pyx_t_1;
24782 
24783  /* "View.MemoryView":479
24784  * cdef setitem_indexed(self, index, value):
24785  * cdef char *itemp = self.get_item_pointer(index)
24786  * self.assign_item_from_object(itemp, value) # <<<<<<<<<<<<<<
24787  *
24788  * cdef convert_item_to_object(self, char *itemp):
24789  */
24790  __pyx_t_2 = ((struct __pyx_vtabstruct_memoryview *)__pyx_v_self->__pyx_vtab)->assign_item_from_object(__pyx_v_self, __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 479, __pyx_L1_error)
24791  __Pyx_GOTREF(__pyx_t_2);
24792  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
24793 
24794  /* "View.MemoryView":477
24795  * PyMem_Free(tmp)
24796  *
24797  * cdef setitem_indexed(self, index, value): # <<<<<<<<<<<<<<
24798  * cdef char *itemp = self.get_item_pointer(index)
24799  * self.assign_item_from_object(itemp, value)
24800  */
24801 
24802  /* function exit code */
24803  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
24804  goto __pyx_L0;
24805  __pyx_L1_error:;
24806  __Pyx_XDECREF(__pyx_t_2);
24807  __Pyx_AddTraceback("View.MemoryView.memoryview.setitem_indexed", __pyx_clineno, __pyx_lineno, __pyx_filename);
24808  __pyx_r = 0;
24809  __pyx_L0:;
24810  __Pyx_XGIVEREF(__pyx_r);
24811  __Pyx_RefNannyFinishContext();
24812  return __pyx_r;
24813 }
24814 
24815 /* "View.MemoryView":481
24816  * self.assign_item_from_object(itemp, value)
24817  *
24818  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
24819  * """Only used if instantiated manually by the user, or if Cython doesn't
24820  * know how to convert the type"""
24821  */
24822 
24823 static PyObject *__pyx_memoryview_convert_item_to_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp) {
24824  PyObject *__pyx_v_struct = NULL;
24825  PyObject *__pyx_v_bytesitem = 0;
24826  PyObject *__pyx_v_result = NULL;
24827  PyObject *__pyx_r = NULL;
24828  __Pyx_RefNannyDeclarations
24829  PyObject *__pyx_t_1 = NULL;
24830  PyObject *__pyx_t_2 = NULL;
24831  PyObject *__pyx_t_3 = NULL;
24832  PyObject *__pyx_t_4 = NULL;
24833  PyObject *__pyx_t_5 = NULL;
24834  PyObject *__pyx_t_6 = NULL;
24835  PyObject *__pyx_t_7 = NULL;
24836  int __pyx_t_8;
24837  PyObject *__pyx_t_9 = NULL;
24838  size_t __pyx_t_10;
24839  int __pyx_t_11;
24840  __Pyx_RefNannySetupContext("convert_item_to_object", 0);
24841 
24842  /* "View.MemoryView":484
24843  * """Only used if instantiated manually by the user, or if Cython doesn't
24844  * know how to convert the type"""
24845  * import struct # <<<<<<<<<<<<<<
24846  * cdef bytes bytesitem
24847  *
24848  */
24849  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error)
24850  __Pyx_GOTREF(__pyx_t_1);
24851  __pyx_v_struct = __pyx_t_1;
24852  __pyx_t_1 = 0;
24853 
24854  /* "View.MemoryView":487
24855  * cdef bytes bytesitem
24856  *
24857  * bytesitem = itemp[:self.view.itemsize] # <<<<<<<<<<<<<<
24858  * try:
24859  * result = struct.unpack(self.view.format, bytesitem)
24860  */
24861  __pyx_t_1 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_itemp + 0, __pyx_v_self->view.itemsize - 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error)
24862  __Pyx_GOTREF(__pyx_t_1);
24863  __pyx_v_bytesitem = ((PyObject*)__pyx_t_1);
24864  __pyx_t_1 = 0;
24865 
24866  /* "View.MemoryView":488
24867  *
24868  * bytesitem = itemp[:self.view.itemsize]
24869  * try: # <<<<<<<<<<<<<<
24870  * result = struct.unpack(self.view.format, bytesitem)
24871  * except struct.error:
24872  */
24873  {
24874  __Pyx_PyThreadState_declare
24875  __Pyx_PyThreadState_assign
24876  __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
24877  __Pyx_XGOTREF(__pyx_t_2);
24878  __Pyx_XGOTREF(__pyx_t_3);
24879  __Pyx_XGOTREF(__pyx_t_4);
24880  /*try:*/ {
24881 
24882  /* "View.MemoryView":489
24883  * bytesitem = itemp[:self.view.itemsize]
24884  * try:
24885  * result = struct.unpack(self.view.format, bytesitem) # <<<<<<<<<<<<<<
24886  * except struct.error:
24887  * raise ValueError("Unable to convert item to object")
24888  */
24889  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_unpack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 489, __pyx_L3_error)
24890  __Pyx_GOTREF(__pyx_t_5);
24891  __pyx_t_6 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 489, __pyx_L3_error)
24892  __Pyx_GOTREF(__pyx_t_6);
24893  __pyx_t_7 = NULL;
24894  __pyx_t_8 = 0;
24895  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
24896  __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
24897  if (likely(__pyx_t_7)) {
24898  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
24899  __Pyx_INCREF(__pyx_t_7);
24900  __Pyx_INCREF(function);
24901  __Pyx_DECREF_SET(__pyx_t_5, function);
24902  __pyx_t_8 = 1;
24903  }
24904  }
24905  #if CYTHON_FAST_PYCALL
24906  if (PyFunction_Check(__pyx_t_5)) {
24907  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
24908  __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L3_error)
24909  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24910  __Pyx_GOTREF(__pyx_t_1);
24911  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24912  } else
24913  #endif
24914  #if CYTHON_FAST_PYCCALL
24915  if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
24916  PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_bytesitem};
24917  __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L3_error)
24918  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
24919  __Pyx_GOTREF(__pyx_t_1);
24920  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
24921  } else
24922  #endif
24923  {
24924  __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 489, __pyx_L3_error)
24925  __Pyx_GOTREF(__pyx_t_9);
24926  if (__pyx_t_7) {
24927  __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
24928  }
24929  __Pyx_GIVEREF(__pyx_t_6);
24930  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
24931  __Pyx_INCREF(__pyx_v_bytesitem);
24932  __Pyx_GIVEREF(__pyx_v_bytesitem);
24933  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_bytesitem);
24934  __pyx_t_6 = 0;
24935  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L3_error)
24936  __Pyx_GOTREF(__pyx_t_1);
24937  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
24938  }
24939  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
24940  __pyx_v_result = __pyx_t_1;
24941  __pyx_t_1 = 0;
24942 
24943  /* "View.MemoryView":488
24944  *
24945  * bytesitem = itemp[:self.view.itemsize]
24946  * try: # <<<<<<<<<<<<<<
24947  * result = struct.unpack(self.view.format, bytesitem)
24948  * except struct.error:
24949  */
24950  }
24951 
24952  /* "View.MemoryView":493
24953  * raise ValueError("Unable to convert item to object")
24954  * else:
24955  * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
24956  * return result[0]
24957  * return result
24958  */
24959  /*else:*/ {
24960  __pyx_t_10 = strlen(__pyx_v_self->view.format);
24961  __pyx_t_11 = ((__pyx_t_10 == 1) != 0);
24962  if (__pyx_t_11) {
24963 
24964  /* "View.MemoryView":494
24965  * else:
24966  * if len(self.view.format) == 1:
24967  * return result[0] # <<<<<<<<<<<<<<
24968  * return result
24969  *
24970  */
24971  __Pyx_XDECREF(__pyx_r);
24972  __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L5_except_error)
24973  __Pyx_GOTREF(__pyx_t_1);
24974  __pyx_r = __pyx_t_1;
24975  __pyx_t_1 = 0;
24976  goto __pyx_L6_except_return;
24977 
24978  /* "View.MemoryView":493
24979  * raise ValueError("Unable to convert item to object")
24980  * else:
24981  * if len(self.view.format) == 1: # <<<<<<<<<<<<<<
24982  * return result[0]
24983  * return result
24984  */
24985  }
24986 
24987  /* "View.MemoryView":495
24988  * if len(self.view.format) == 1:
24989  * return result[0]
24990  * return result # <<<<<<<<<<<<<<
24991  *
24992  * cdef assign_item_from_object(self, char *itemp, object value):
24993  */
24994  __Pyx_XDECREF(__pyx_r);
24995  __Pyx_INCREF(__pyx_v_result);
24996  __pyx_r = __pyx_v_result;
24997  goto __pyx_L6_except_return;
24998  }
24999  __pyx_L3_error:;
25000  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
25001  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
25002  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
25003  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25004  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
25005 
25006  /* "View.MemoryView":490
25007  * try:
25008  * result = struct.unpack(self.view.format, bytesitem)
25009  * except struct.error: # <<<<<<<<<<<<<<
25010  * raise ValueError("Unable to convert item to object")
25011  * else:
25012  */
25013  __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_5, &__pyx_t_9);
25014  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 490, __pyx_L5_except_error)
25015  __Pyx_GOTREF(__pyx_t_6);
25016  __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_1, __pyx_t_6);
25017  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25018  __Pyx_ErrRestore(__pyx_t_1, __pyx_t_5, __pyx_t_9);
25019  __pyx_t_1 = 0; __pyx_t_5 = 0; __pyx_t_9 = 0;
25020  if (__pyx_t_8) {
25021  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
25022  if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_5, &__pyx_t_1) < 0) __PYX_ERR(0, 490, __pyx_L5_except_error)
25023  __Pyx_GOTREF(__pyx_t_9);
25024  __Pyx_GOTREF(__pyx_t_5);
25025  __Pyx_GOTREF(__pyx_t_1);
25026 
25027  /* "View.MemoryView":491
25028  * result = struct.unpack(self.view.format, bytesitem)
25029  * except struct.error:
25030  * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
25031  * else:
25032  * if len(self.view.format) == 1:
25033  */
25034  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 491, __pyx_L5_except_error)
25035  __Pyx_GOTREF(__pyx_t_6);
25036  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
25037  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25038  __PYX_ERR(0, 491, __pyx_L5_except_error)
25039  }
25040  goto __pyx_L5_except_error;
25041  __pyx_L5_except_error:;
25042 
25043  /* "View.MemoryView":488
25044  *
25045  * bytesitem = itemp[:self.view.itemsize]
25046  * try: # <<<<<<<<<<<<<<
25047  * result = struct.unpack(self.view.format, bytesitem)
25048  * except struct.error:
25049  */
25050  __Pyx_XGIVEREF(__pyx_t_2);
25051  __Pyx_XGIVEREF(__pyx_t_3);
25052  __Pyx_XGIVEREF(__pyx_t_4);
25053  __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
25054  goto __pyx_L1_error;
25055  __pyx_L6_except_return:;
25056  __Pyx_XGIVEREF(__pyx_t_2);
25057  __Pyx_XGIVEREF(__pyx_t_3);
25058  __Pyx_XGIVEREF(__pyx_t_4);
25059  __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
25060  goto __pyx_L0;
25061  }
25062 
25063  /* "View.MemoryView":481
25064  * self.assign_item_from_object(itemp, value)
25065  *
25066  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
25067  * """Only used if instantiated manually by the user, or if Cython doesn't
25068  * know how to convert the type"""
25069  */
25070 
25071  /* function exit code */
25072  __pyx_L1_error:;
25073  __Pyx_XDECREF(__pyx_t_1);
25074  __Pyx_XDECREF(__pyx_t_5);
25075  __Pyx_XDECREF(__pyx_t_6);
25076  __Pyx_XDECREF(__pyx_t_7);
25077  __Pyx_XDECREF(__pyx_t_9);
25078  __Pyx_AddTraceback("View.MemoryView.memoryview.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
25079  __pyx_r = 0;
25080  __pyx_L0:;
25081  __Pyx_XDECREF(__pyx_v_struct);
25082  __Pyx_XDECREF(__pyx_v_bytesitem);
25083  __Pyx_XDECREF(__pyx_v_result);
25084  __Pyx_XGIVEREF(__pyx_r);
25085  __Pyx_RefNannyFinishContext();
25086  return __pyx_r;
25087 }
25088 
25089 /* "View.MemoryView":497
25090  * return result
25091  *
25092  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
25093  * """Only used if instantiated manually by the user, or if Cython doesn't
25094  * know how to convert the type"""
25095  */
25096 
25097 static PyObject *__pyx_memoryview_assign_item_from_object(struct __pyx_memoryview_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
25098  PyObject *__pyx_v_struct = NULL;
25099  char __pyx_v_c;
25100  PyObject *__pyx_v_bytesvalue = 0;
25101  Py_ssize_t __pyx_v_i;
25102  PyObject *__pyx_r = NULL;
25103  __Pyx_RefNannyDeclarations
25104  PyObject *__pyx_t_1 = NULL;
25105  int __pyx_t_2;
25106  int __pyx_t_3;
25107  PyObject *__pyx_t_4 = NULL;
25108  PyObject *__pyx_t_5 = NULL;
25109  PyObject *__pyx_t_6 = NULL;
25110  int __pyx_t_7;
25111  PyObject *__pyx_t_8 = NULL;
25112  Py_ssize_t __pyx_t_9;
25113  PyObject *__pyx_t_10 = NULL;
25114  char *__pyx_t_11;
25115  char *__pyx_t_12;
25116  char *__pyx_t_13;
25117  char *__pyx_t_14;
25118  __Pyx_RefNannySetupContext("assign_item_from_object", 0);
25119 
25120  /* "View.MemoryView":500
25121  * """Only used if instantiated manually by the user, or if Cython doesn't
25122  * know how to convert the type"""
25123  * import struct # <<<<<<<<<<<<<<
25124  * cdef char c
25125  * cdef bytes bytesvalue
25126  */
25127  __pyx_t_1 = __Pyx_Import(__pyx_n_s_struct, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error)
25128  __Pyx_GOTREF(__pyx_t_1);
25129  __pyx_v_struct = __pyx_t_1;
25130  __pyx_t_1 = 0;
25131 
25132  /* "View.MemoryView":505
25133  * cdef Py_ssize_t i
25134  *
25135  * if isinstance(value, tuple): # <<<<<<<<<<<<<<
25136  * bytesvalue = struct.pack(self.view.format, *value)
25137  * else:
25138  */
25139  __pyx_t_2 = PyTuple_Check(__pyx_v_value);
25140  __pyx_t_3 = (__pyx_t_2 != 0);
25141  if (__pyx_t_3) {
25142 
25143  /* "View.MemoryView":506
25144  *
25145  * if isinstance(value, tuple):
25146  * bytesvalue = struct.pack(self.view.format, *value) # <<<<<<<<<<<<<<
25147  * else:
25148  * bytesvalue = struct.pack(self.view.format, value)
25149  */
25150  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
25151  __Pyx_GOTREF(__pyx_t_1);
25152  __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L1_error)
25153  __Pyx_GOTREF(__pyx_t_4);
25154  __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 506, __pyx_L1_error)
25155  __Pyx_GOTREF(__pyx_t_5);
25156  __Pyx_GIVEREF(__pyx_t_4);
25157  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
25158  __pyx_t_4 = 0;
25159  __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L1_error)
25160  __Pyx_GOTREF(__pyx_t_4);
25161  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 506, __pyx_L1_error)
25162  __Pyx_GOTREF(__pyx_t_6);
25163  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25164  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
25165  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 506, __pyx_L1_error)
25166  __Pyx_GOTREF(__pyx_t_4);
25167  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25168  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25169  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 506, __pyx_L1_error)
25170  __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
25171  __pyx_t_4 = 0;
25172 
25173  /* "View.MemoryView":505
25174  * cdef Py_ssize_t i
25175  *
25176  * if isinstance(value, tuple): # <<<<<<<<<<<<<<
25177  * bytesvalue = struct.pack(self.view.format, *value)
25178  * else:
25179  */
25180  goto __pyx_L3;
25181  }
25182 
25183  /* "View.MemoryView":508
25184  * bytesvalue = struct.pack(self.view.format, *value)
25185  * else:
25186  * bytesvalue = struct.pack(self.view.format, value) # <<<<<<<<<<<<<<
25187  *
25188  * for i, c in enumerate(bytesvalue):
25189  */
25190  /*else*/ {
25191  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_struct, __pyx_n_s_pack); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 508, __pyx_L1_error)
25192  __Pyx_GOTREF(__pyx_t_6);
25193  __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_self->view.format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error)
25194  __Pyx_GOTREF(__pyx_t_1);
25195  __pyx_t_5 = NULL;
25196  __pyx_t_7 = 0;
25197  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
25198  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
25199  if (likely(__pyx_t_5)) {
25200  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
25201  __Pyx_INCREF(__pyx_t_5);
25202  __Pyx_INCREF(function);
25203  __Pyx_DECREF_SET(__pyx_t_6, function);
25204  __pyx_t_7 = 1;
25205  }
25206  }
25207  #if CYTHON_FAST_PYCALL
25208  if (PyFunction_Check(__pyx_t_6)) {
25209  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
25210  __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
25211  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25212  __Pyx_GOTREF(__pyx_t_4);
25213  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25214  } else
25215  #endif
25216  #if CYTHON_FAST_PYCCALL
25217  if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
25218  PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_1, __pyx_v_value};
25219  __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
25220  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
25221  __Pyx_GOTREF(__pyx_t_4);
25222  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25223  } else
25224  #endif
25225  {
25226  __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 508, __pyx_L1_error)
25227  __Pyx_GOTREF(__pyx_t_8);
25228  if (__pyx_t_5) {
25229  __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
25230  }
25231  __Pyx_GIVEREF(__pyx_t_1);
25232  PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
25233  __Pyx_INCREF(__pyx_v_value);
25234  __Pyx_GIVEREF(__pyx_v_value);
25235  PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_value);
25236  __pyx_t_1 = 0;
25237  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 508, __pyx_L1_error)
25238  __Pyx_GOTREF(__pyx_t_4);
25239  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
25240  }
25241  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25242  if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 508, __pyx_L1_error)
25243  __pyx_v_bytesvalue = ((PyObject*)__pyx_t_4);
25244  __pyx_t_4 = 0;
25245  }
25246  __pyx_L3:;
25247 
25248  /* "View.MemoryView":510
25249  * bytesvalue = struct.pack(self.view.format, value)
25250  *
25251  * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
25252  * itemp[i] = c
25253  *
25254  */
25255  __pyx_t_9 = 0;
25256  if (unlikely(__pyx_v_bytesvalue == Py_None)) {
25257  PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable");
25258  __PYX_ERR(0, 510, __pyx_L1_error)
25259  }
25260  __Pyx_INCREF(__pyx_v_bytesvalue);
25261  __pyx_t_10 = __pyx_v_bytesvalue;
25262  __pyx_t_12 = PyBytes_AS_STRING(__pyx_t_10);
25263  __pyx_t_13 = (__pyx_t_12 + PyBytes_GET_SIZE(__pyx_t_10));
25264  for (__pyx_t_14 = __pyx_t_12; __pyx_t_14 < __pyx_t_13; __pyx_t_14++) {
25265  __pyx_t_11 = __pyx_t_14;
25266  __pyx_v_c = (__pyx_t_11[0]);
25267 
25268  /* "View.MemoryView":511
25269  *
25270  * for i, c in enumerate(bytesvalue):
25271  * itemp[i] = c # <<<<<<<<<<<<<<
25272  *
25273  * @cname('getbuffer')
25274  */
25275  __pyx_v_i = __pyx_t_9;
25276 
25277  /* "View.MemoryView":510
25278  * bytesvalue = struct.pack(self.view.format, value)
25279  *
25280  * for i, c in enumerate(bytesvalue): # <<<<<<<<<<<<<<
25281  * itemp[i] = c
25282  *
25283  */
25284  __pyx_t_9 = (__pyx_t_9 + 1);
25285 
25286  /* "View.MemoryView":511
25287  *
25288  * for i, c in enumerate(bytesvalue):
25289  * itemp[i] = c # <<<<<<<<<<<<<<
25290  *
25291  * @cname('getbuffer')
25292  */
25293  (__pyx_v_itemp[__pyx_v_i]) = __pyx_v_c;
25294  }
25295  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
25296 
25297  /* "View.MemoryView":497
25298  * return result
25299  *
25300  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
25301  * """Only used if instantiated manually by the user, or if Cython doesn't
25302  * know how to convert the type"""
25303  */
25304 
25305  /* function exit code */
25306  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
25307  goto __pyx_L0;
25308  __pyx_L1_error:;
25309  __Pyx_XDECREF(__pyx_t_1);
25310  __Pyx_XDECREF(__pyx_t_4);
25311  __Pyx_XDECREF(__pyx_t_5);
25312  __Pyx_XDECREF(__pyx_t_6);
25313  __Pyx_XDECREF(__pyx_t_8);
25314  __Pyx_XDECREF(__pyx_t_10);
25315  __Pyx_AddTraceback("View.MemoryView.memoryview.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
25316  __pyx_r = 0;
25317  __pyx_L0:;
25318  __Pyx_XDECREF(__pyx_v_struct);
25319  __Pyx_XDECREF(__pyx_v_bytesvalue);
25320  __Pyx_XGIVEREF(__pyx_r);
25321  __Pyx_RefNannyFinishContext();
25322  return __pyx_r;
25323 }
25324 
25325 /* "View.MemoryView":514
25326  *
25327  * @cname('getbuffer')
25328  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
25329  * if flags & PyBUF_WRITABLE and self.view.readonly:
25330  * raise ValueError("Cannot create writable memory view from read-only memoryview")
25331  */
25332 
25333 /* Python wrapper */
25334 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
25335 static CYTHON_UNUSED int __pyx_memoryview_getbuffer(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
25336  int __pyx_r;
25337  __Pyx_RefNannyDeclarations
25338  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
25339  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
25340 
25341  /* function exit code */
25342  __Pyx_RefNannyFinishContext();
25343  return __pyx_r;
25344 }
25345 
25346 static int __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_8__getbuffer__(struct __pyx_memoryview_obj *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
25347  int __pyx_r;
25348  __Pyx_RefNannyDeclarations
25349  int __pyx_t_1;
25350  int __pyx_t_2;
25351  PyObject *__pyx_t_3 = NULL;
25352  Py_ssize_t *__pyx_t_4;
25353  char *__pyx_t_5;
25354  void *__pyx_t_6;
25355  int __pyx_t_7;
25356  Py_ssize_t __pyx_t_8;
25357  if (__pyx_v_info == NULL) {
25358  PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
25359  return -1;
25360  }
25361  __Pyx_RefNannySetupContext("__getbuffer__", 0);
25362  __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
25363  __Pyx_GIVEREF(__pyx_v_info->obj);
25364 
25365  /* "View.MemoryView":515
25366  * @cname('getbuffer')
25367  * def __getbuffer__(self, Py_buffer *info, int flags):
25368  * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
25369  * raise ValueError("Cannot create writable memory view from read-only memoryview")
25370  *
25371  */
25372  __pyx_t_2 = ((__pyx_v_flags & PyBUF_WRITABLE) != 0);
25373  if (__pyx_t_2) {
25374  } else {
25375  __pyx_t_1 = __pyx_t_2;
25376  goto __pyx_L4_bool_binop_done;
25377  }
25378  __pyx_t_2 = (__pyx_v_self->view.readonly != 0);
25379  __pyx_t_1 = __pyx_t_2;
25380  __pyx_L4_bool_binop_done:;
25381  if (unlikely(__pyx_t_1)) {
25382 
25383  /* "View.MemoryView":516
25384  * def __getbuffer__(self, Py_buffer *info, int flags):
25385  * if flags & PyBUF_WRITABLE and self.view.readonly:
25386  * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
25387  *
25388  * if flags & PyBUF_ND:
25389  */
25390  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 516, __pyx_L1_error)
25391  __Pyx_GOTREF(__pyx_t_3);
25392  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
25393  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
25394  __PYX_ERR(0, 516, __pyx_L1_error)
25395 
25396  /* "View.MemoryView":515
25397  * @cname('getbuffer')
25398  * def __getbuffer__(self, Py_buffer *info, int flags):
25399  * if flags & PyBUF_WRITABLE and self.view.readonly: # <<<<<<<<<<<<<<
25400  * raise ValueError("Cannot create writable memory view from read-only memoryview")
25401  *
25402  */
25403  }
25404 
25405  /* "View.MemoryView":518
25406  * raise ValueError("Cannot create writable memory view from read-only memoryview")
25407  *
25408  * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
25409  * info.shape = self.view.shape
25410  * else:
25411  */
25412  __pyx_t_1 = ((__pyx_v_flags & PyBUF_ND) != 0);
25413  if (__pyx_t_1) {
25414 
25415  /* "View.MemoryView":519
25416  *
25417  * if flags & PyBUF_ND:
25418  * info.shape = self.view.shape # <<<<<<<<<<<<<<
25419  * else:
25420  * info.shape = NULL
25421  */
25422  __pyx_t_4 = __pyx_v_self->view.shape;
25423  __pyx_v_info->shape = __pyx_t_4;
25424 
25425  /* "View.MemoryView":518
25426  * raise ValueError("Cannot create writable memory view from read-only memoryview")
25427  *
25428  * if flags & PyBUF_ND: # <<<<<<<<<<<<<<
25429  * info.shape = self.view.shape
25430  * else:
25431  */
25432  goto __pyx_L6;
25433  }
25434 
25435  /* "View.MemoryView":521
25436  * info.shape = self.view.shape
25437  * else:
25438  * info.shape = NULL # <<<<<<<<<<<<<<
25439  *
25440  * if flags & PyBUF_STRIDES:
25441  */
25442  /*else*/ {
25443  __pyx_v_info->shape = NULL;
25444  }
25445  __pyx_L6:;
25446 
25447  /* "View.MemoryView":523
25448  * info.shape = NULL
25449  *
25450  * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
25451  * info.strides = self.view.strides
25452  * else:
25453  */
25454  __pyx_t_1 = ((__pyx_v_flags & PyBUF_STRIDES) != 0);
25455  if (__pyx_t_1) {
25456 
25457  /* "View.MemoryView":524
25458  *
25459  * if flags & PyBUF_STRIDES:
25460  * info.strides = self.view.strides # <<<<<<<<<<<<<<
25461  * else:
25462  * info.strides = NULL
25463  */
25464  __pyx_t_4 = __pyx_v_self->view.strides;
25465  __pyx_v_info->strides = __pyx_t_4;
25466 
25467  /* "View.MemoryView":523
25468  * info.shape = NULL
25469  *
25470  * if flags & PyBUF_STRIDES: # <<<<<<<<<<<<<<
25471  * info.strides = self.view.strides
25472  * else:
25473  */
25474  goto __pyx_L7;
25475  }
25476 
25477  /* "View.MemoryView":526
25478  * info.strides = self.view.strides
25479  * else:
25480  * info.strides = NULL # <<<<<<<<<<<<<<
25481  *
25482  * if flags & PyBUF_INDIRECT:
25483  */
25484  /*else*/ {
25485  __pyx_v_info->strides = NULL;
25486  }
25487  __pyx_L7:;
25488 
25489  /* "View.MemoryView":528
25490  * info.strides = NULL
25491  *
25492  * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
25493  * info.suboffsets = self.view.suboffsets
25494  * else:
25495  */
25496  __pyx_t_1 = ((__pyx_v_flags & PyBUF_INDIRECT) != 0);
25497  if (__pyx_t_1) {
25498 
25499  /* "View.MemoryView":529
25500  *
25501  * if flags & PyBUF_INDIRECT:
25502  * info.suboffsets = self.view.suboffsets # <<<<<<<<<<<<<<
25503  * else:
25504  * info.suboffsets = NULL
25505  */
25506  __pyx_t_4 = __pyx_v_self->view.suboffsets;
25507  __pyx_v_info->suboffsets = __pyx_t_4;
25508 
25509  /* "View.MemoryView":528
25510  * info.strides = NULL
25511  *
25512  * if flags & PyBUF_INDIRECT: # <<<<<<<<<<<<<<
25513  * info.suboffsets = self.view.suboffsets
25514  * else:
25515  */
25516  goto __pyx_L8;
25517  }
25518 
25519  /* "View.MemoryView":531
25520  * info.suboffsets = self.view.suboffsets
25521  * else:
25522  * info.suboffsets = NULL # <<<<<<<<<<<<<<
25523  *
25524  * if flags & PyBUF_FORMAT:
25525  */
25526  /*else*/ {
25527  __pyx_v_info->suboffsets = NULL;
25528  }
25529  __pyx_L8:;
25530 
25531  /* "View.MemoryView":533
25532  * info.suboffsets = NULL
25533  *
25534  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
25535  * info.format = self.view.format
25536  * else:
25537  */
25538  __pyx_t_1 = ((__pyx_v_flags & PyBUF_FORMAT) != 0);
25539  if (__pyx_t_1) {
25540 
25541  /* "View.MemoryView":534
25542  *
25543  * if flags & PyBUF_FORMAT:
25544  * info.format = self.view.format # <<<<<<<<<<<<<<
25545  * else:
25546  * info.format = NULL
25547  */
25548  __pyx_t_5 = __pyx_v_self->view.format;
25549  __pyx_v_info->format = __pyx_t_5;
25550 
25551  /* "View.MemoryView":533
25552  * info.suboffsets = NULL
25553  *
25554  * if flags & PyBUF_FORMAT: # <<<<<<<<<<<<<<
25555  * info.format = self.view.format
25556  * else:
25557  */
25558  goto __pyx_L9;
25559  }
25560 
25561  /* "View.MemoryView":536
25562  * info.format = self.view.format
25563  * else:
25564  * info.format = NULL # <<<<<<<<<<<<<<
25565  *
25566  * info.buf = self.view.buf
25567  */
25568  /*else*/ {
25569  __pyx_v_info->format = NULL;
25570  }
25571  __pyx_L9:;
25572 
25573  /* "View.MemoryView":538
25574  * info.format = NULL
25575  *
25576  * info.buf = self.view.buf # <<<<<<<<<<<<<<
25577  * info.ndim = self.view.ndim
25578  * info.itemsize = self.view.itemsize
25579  */
25580  __pyx_t_6 = __pyx_v_self->view.buf;
25581  __pyx_v_info->buf = __pyx_t_6;
25582 
25583  /* "View.MemoryView":539
25584  *
25585  * info.buf = self.view.buf
25586  * info.ndim = self.view.ndim # <<<<<<<<<<<<<<
25587  * info.itemsize = self.view.itemsize
25588  * info.len = self.view.len
25589  */
25590  __pyx_t_7 = __pyx_v_self->view.ndim;
25591  __pyx_v_info->ndim = __pyx_t_7;
25592 
25593  /* "View.MemoryView":540
25594  * info.buf = self.view.buf
25595  * info.ndim = self.view.ndim
25596  * info.itemsize = self.view.itemsize # <<<<<<<<<<<<<<
25597  * info.len = self.view.len
25598  * info.readonly = self.view.readonly
25599  */
25600  __pyx_t_8 = __pyx_v_self->view.itemsize;
25601  __pyx_v_info->itemsize = __pyx_t_8;
25602 
25603  /* "View.MemoryView":541
25604  * info.ndim = self.view.ndim
25605  * info.itemsize = self.view.itemsize
25606  * info.len = self.view.len # <<<<<<<<<<<<<<
25607  * info.readonly = self.view.readonly
25608  * info.obj = self
25609  */
25610  __pyx_t_8 = __pyx_v_self->view.len;
25611  __pyx_v_info->len = __pyx_t_8;
25612 
25613  /* "View.MemoryView":542
25614  * info.itemsize = self.view.itemsize
25615  * info.len = self.view.len
25616  * info.readonly = self.view.readonly # <<<<<<<<<<<<<<
25617  * info.obj = self
25618  *
25619  */
25620  __pyx_t_1 = __pyx_v_self->view.readonly;
25621  __pyx_v_info->readonly = __pyx_t_1;
25622 
25623  /* "View.MemoryView":543
25624  * info.len = self.view.len
25625  * info.readonly = self.view.readonly
25626  * info.obj = self # <<<<<<<<<<<<<<
25627  *
25628  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
25629  */
25630  __Pyx_INCREF(((PyObject *)__pyx_v_self));
25631  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
25632  __Pyx_GOTREF(__pyx_v_info->obj);
25633  __Pyx_DECREF(__pyx_v_info->obj);
25634  __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
25635 
25636  /* "View.MemoryView":514
25637  *
25638  * @cname('getbuffer')
25639  * def __getbuffer__(self, Py_buffer *info, int flags): # <<<<<<<<<<<<<<
25640  * if flags & PyBUF_WRITABLE and self.view.readonly:
25641  * raise ValueError("Cannot create writable memory view from read-only memoryview")
25642  */
25643 
25644  /* function exit code */
25645  __pyx_r = 0;
25646  goto __pyx_L0;
25647  __pyx_L1_error:;
25648  __Pyx_XDECREF(__pyx_t_3);
25649  __Pyx_AddTraceback("View.MemoryView.memoryview.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25650  __pyx_r = -1;
25651  if (__pyx_v_info->obj != NULL) {
25652  __Pyx_GOTREF(__pyx_v_info->obj);
25653  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
25654  }
25655  goto __pyx_L2;
25656  __pyx_L0:;
25657  if (__pyx_v_info->obj == Py_None) {
25658  __Pyx_GOTREF(__pyx_v_info->obj);
25659  __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
25660  }
25661  __pyx_L2:;
25662  __Pyx_RefNannyFinishContext();
25663  return __pyx_r;
25664 }
25665 
25666 /* "View.MemoryView":549
25667  *
25668  * @property
25669  * def T(self): # <<<<<<<<<<<<<<
25670  * cdef _memoryviewslice result = memoryview_copy(self)
25671  * transpose_memslice(&result.from_slice)
25672  */
25673 
25674 /* Python wrapper */
25675 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self); /*proto*/
25676 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(PyObject *__pyx_v_self) {
25677  PyObject *__pyx_r = 0;
25678  __Pyx_RefNannyDeclarations
25679  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25680  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25681 
25682  /* function exit code */
25683  __Pyx_RefNannyFinishContext();
25684  return __pyx_r;
25685 }
25686 
25687 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_1T___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25688  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
25689  PyObject *__pyx_r = NULL;
25690  __Pyx_RefNannyDeclarations
25691  PyObject *__pyx_t_1 = NULL;
25692  int __pyx_t_2;
25693  __Pyx_RefNannySetupContext("__get__", 0);
25694 
25695  /* "View.MemoryView":550
25696  * @property
25697  * def T(self):
25698  * cdef _memoryviewslice result = memoryview_copy(self) # <<<<<<<<<<<<<<
25699  * transpose_memslice(&result.from_slice)
25700  * return result
25701  */
25702  __pyx_t_1 = __pyx_memoryview_copy_object(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L1_error)
25703  __Pyx_GOTREF(__pyx_t_1);
25704  if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_memoryviewslice_type))))) __PYX_ERR(0, 550, __pyx_L1_error)
25705  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_1);
25706  __pyx_t_1 = 0;
25707 
25708  /* "View.MemoryView":551
25709  * def T(self):
25710  * cdef _memoryviewslice result = memoryview_copy(self)
25711  * transpose_memslice(&result.from_slice) # <<<<<<<<<<<<<<
25712  * return result
25713  *
25714  */
25715  __pyx_t_2 = __pyx_memslice_transpose((&__pyx_v_result->from_slice)); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(0, 551, __pyx_L1_error)
25716 
25717  /* "View.MemoryView":552
25718  * cdef _memoryviewslice result = memoryview_copy(self)
25719  * transpose_memslice(&result.from_slice)
25720  * return result # <<<<<<<<<<<<<<
25721  *
25722  * @property
25723  */
25724  __Pyx_XDECREF(__pyx_r);
25725  __Pyx_INCREF(((PyObject *)__pyx_v_result));
25726  __pyx_r = ((PyObject *)__pyx_v_result);
25727  goto __pyx_L0;
25728 
25729  /* "View.MemoryView":549
25730  *
25731  * @property
25732  * def T(self): # <<<<<<<<<<<<<<
25733  * cdef _memoryviewslice result = memoryview_copy(self)
25734  * transpose_memslice(&result.from_slice)
25735  */
25736 
25737  /* function exit code */
25738  __pyx_L1_error:;
25739  __Pyx_XDECREF(__pyx_t_1);
25740  __Pyx_AddTraceback("View.MemoryView.memoryview.T.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25741  __pyx_r = NULL;
25742  __pyx_L0:;
25743  __Pyx_XDECREF((PyObject *)__pyx_v_result);
25744  __Pyx_XGIVEREF(__pyx_r);
25745  __Pyx_RefNannyFinishContext();
25746  return __pyx_r;
25747 }
25748 
25749 /* "View.MemoryView":555
25750  *
25751  * @property
25752  * def base(self): # <<<<<<<<<<<<<<
25753  * return self.obj
25754  *
25755  */
25756 
25757 /* Python wrapper */
25758 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
25759 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(PyObject *__pyx_v_self) {
25760  PyObject *__pyx_r = 0;
25761  __Pyx_RefNannyDeclarations
25762  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25763  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25764 
25765  /* function exit code */
25766  __Pyx_RefNannyFinishContext();
25767  return __pyx_r;
25768 }
25769 
25770 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4base___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25771  PyObject *__pyx_r = NULL;
25772  __Pyx_RefNannyDeclarations
25773  __Pyx_RefNannySetupContext("__get__", 0);
25774 
25775  /* "View.MemoryView":556
25776  * @property
25777  * def base(self):
25778  * return self.obj # <<<<<<<<<<<<<<
25779  *
25780  * @property
25781  */
25782  __Pyx_XDECREF(__pyx_r);
25783  __Pyx_INCREF(__pyx_v_self->obj);
25784  __pyx_r = __pyx_v_self->obj;
25785  goto __pyx_L0;
25786 
25787  /* "View.MemoryView":555
25788  *
25789  * @property
25790  * def base(self): # <<<<<<<<<<<<<<
25791  * return self.obj
25792  *
25793  */
25794 
25795  /* function exit code */
25796  __pyx_L0:;
25797  __Pyx_XGIVEREF(__pyx_r);
25798  __Pyx_RefNannyFinishContext();
25799  return __pyx_r;
25800 }
25801 
25802 /* "View.MemoryView":559
25803  *
25804  * @property
25805  * def shape(self): # <<<<<<<<<<<<<<
25806  * return tuple([length for length in self.view.shape[:self.view.ndim]])
25807  *
25808  */
25809 
25810 /* Python wrapper */
25811 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self); /*proto*/
25812 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(PyObject *__pyx_v_self) {
25813  PyObject *__pyx_r = 0;
25814  __Pyx_RefNannyDeclarations
25815  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25816  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25817 
25818  /* function exit code */
25819  __Pyx_RefNannyFinishContext();
25820  return __pyx_r;
25821 }
25822 
25823 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_5shape___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25824  Py_ssize_t __pyx_v_length;
25825  PyObject *__pyx_r = NULL;
25826  __Pyx_RefNannyDeclarations
25827  PyObject *__pyx_t_1 = NULL;
25828  Py_ssize_t *__pyx_t_2;
25829  Py_ssize_t *__pyx_t_3;
25830  Py_ssize_t *__pyx_t_4;
25831  PyObject *__pyx_t_5 = NULL;
25832  __Pyx_RefNannySetupContext("__get__", 0);
25833 
25834  /* "View.MemoryView":560
25835  * @property
25836  * def shape(self):
25837  * return tuple([length for length in self.view.shape[:self.view.ndim]]) # <<<<<<<<<<<<<<
25838  *
25839  * @property
25840  */
25841  __Pyx_XDECREF(__pyx_r);
25842  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
25843  __Pyx_GOTREF(__pyx_t_1);
25844  __pyx_t_3 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
25845  for (__pyx_t_4 = __pyx_v_self->view.shape; __pyx_t_4 < __pyx_t_3; __pyx_t_4++) {
25846  __pyx_t_2 = __pyx_t_4;
25847  __pyx_v_length = (__pyx_t_2[0]);
25848  __pyx_t_5 = PyInt_FromSsize_t(__pyx_v_length); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 560, __pyx_L1_error)
25849  __Pyx_GOTREF(__pyx_t_5);
25850  if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 560, __pyx_L1_error)
25851  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
25852  }
25853  __pyx_t_5 = PyList_AsTuple(((PyObject*)__pyx_t_1)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 560, __pyx_L1_error)
25854  __Pyx_GOTREF(__pyx_t_5);
25855  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
25856  __pyx_r = __pyx_t_5;
25857  __pyx_t_5 = 0;
25858  goto __pyx_L0;
25859 
25860  /* "View.MemoryView":559
25861  *
25862  * @property
25863  * def shape(self): # <<<<<<<<<<<<<<
25864  * return tuple([length for length in self.view.shape[:self.view.ndim]])
25865  *
25866  */
25867 
25868  /* function exit code */
25869  __pyx_L1_error:;
25870  __Pyx_XDECREF(__pyx_t_1);
25871  __Pyx_XDECREF(__pyx_t_5);
25872  __Pyx_AddTraceback("View.MemoryView.memoryview.shape.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25873  __pyx_r = NULL;
25874  __pyx_L0:;
25875  __Pyx_XGIVEREF(__pyx_r);
25876  __Pyx_RefNannyFinishContext();
25877  return __pyx_r;
25878 }
25879 
25880 /* "View.MemoryView":563
25881  *
25882  * @property
25883  * def strides(self): # <<<<<<<<<<<<<<
25884  * if self.view.strides == NULL:
25885  *
25886  */
25887 
25888 /* Python wrapper */
25889 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self); /*proto*/
25890 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(PyObject *__pyx_v_self) {
25891  PyObject *__pyx_r = 0;
25892  __Pyx_RefNannyDeclarations
25893  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
25894  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
25895 
25896  /* function exit code */
25897  __Pyx_RefNannyFinishContext();
25898  return __pyx_r;
25899 }
25900 
25901 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_7strides___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
25902  Py_ssize_t __pyx_v_stride;
25903  PyObject *__pyx_r = NULL;
25904  __Pyx_RefNannyDeclarations
25905  int __pyx_t_1;
25906  PyObject *__pyx_t_2 = NULL;
25907  Py_ssize_t *__pyx_t_3;
25908  Py_ssize_t *__pyx_t_4;
25909  Py_ssize_t *__pyx_t_5;
25910  PyObject *__pyx_t_6 = NULL;
25911  __Pyx_RefNannySetupContext("__get__", 0);
25912 
25913  /* "View.MemoryView":564
25914  * @property
25915  * def strides(self):
25916  * if self.view.strides == NULL: # <<<<<<<<<<<<<<
25917  *
25918  * raise ValueError("Buffer view does not expose strides")
25919  */
25920  __pyx_t_1 = ((__pyx_v_self->view.strides == NULL) != 0);
25921  if (unlikely(__pyx_t_1)) {
25922 
25923  /* "View.MemoryView":566
25924  * if self.view.strides == NULL:
25925  *
25926  * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
25927  *
25928  * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
25929  */
25930  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error)
25931  __Pyx_GOTREF(__pyx_t_2);
25932  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
25933  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25934  __PYX_ERR(0, 566, __pyx_L1_error)
25935 
25936  /* "View.MemoryView":564
25937  * @property
25938  * def strides(self):
25939  * if self.view.strides == NULL: # <<<<<<<<<<<<<<
25940  *
25941  * raise ValueError("Buffer view does not expose strides")
25942  */
25943  }
25944 
25945  /* "View.MemoryView":568
25946  * raise ValueError("Buffer view does not expose strides")
25947  *
25948  * return tuple([stride for stride in self.view.strides[:self.view.ndim]]) # <<<<<<<<<<<<<<
25949  *
25950  * @property
25951  */
25952  __Pyx_XDECREF(__pyx_r);
25953  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 568, __pyx_L1_error)
25954  __Pyx_GOTREF(__pyx_t_2);
25955  __pyx_t_4 = (__pyx_v_self->view.strides + __pyx_v_self->view.ndim);
25956  for (__pyx_t_5 = __pyx_v_self->view.strides; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
25957  __pyx_t_3 = __pyx_t_5;
25958  __pyx_v_stride = (__pyx_t_3[0]);
25959  __pyx_t_6 = PyInt_FromSsize_t(__pyx_v_stride); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 568, __pyx_L1_error)
25960  __Pyx_GOTREF(__pyx_t_6);
25961  if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 568, __pyx_L1_error)
25962  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
25963  }
25964  __pyx_t_6 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 568, __pyx_L1_error)
25965  __Pyx_GOTREF(__pyx_t_6);
25966  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
25967  __pyx_r = __pyx_t_6;
25968  __pyx_t_6 = 0;
25969  goto __pyx_L0;
25970 
25971  /* "View.MemoryView":563
25972  *
25973  * @property
25974  * def strides(self): # <<<<<<<<<<<<<<
25975  * if self.view.strides == NULL:
25976  *
25977  */
25978 
25979  /* function exit code */
25980  __pyx_L1_error:;
25981  __Pyx_XDECREF(__pyx_t_2);
25982  __Pyx_XDECREF(__pyx_t_6);
25983  __Pyx_AddTraceback("View.MemoryView.memoryview.strides.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
25984  __pyx_r = NULL;
25985  __pyx_L0:;
25986  __Pyx_XGIVEREF(__pyx_r);
25987  __Pyx_RefNannyFinishContext();
25988  return __pyx_r;
25989 }
25990 
25991 /* "View.MemoryView":571
25992  *
25993  * @property
25994  * def suboffsets(self): # <<<<<<<<<<<<<<
25995  * if self.view.suboffsets == NULL:
25996  * return (-1,) * self.view.ndim
25997  */
25998 
25999 /* Python wrapper */
26000 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self); /*proto*/
26001 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(PyObject *__pyx_v_self) {
26002  PyObject *__pyx_r = 0;
26003  __Pyx_RefNannyDeclarations
26004  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26005  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26006 
26007  /* function exit code */
26008  __Pyx_RefNannyFinishContext();
26009  return __pyx_r;
26010 }
26011 
26012 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_10suboffsets___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
26013  Py_ssize_t __pyx_v_suboffset;
26014  PyObject *__pyx_r = NULL;
26015  __Pyx_RefNannyDeclarations
26016  int __pyx_t_1;
26017  PyObject *__pyx_t_2 = NULL;
26018  PyObject *__pyx_t_3 = NULL;
26019  Py_ssize_t *__pyx_t_4;
26020  Py_ssize_t *__pyx_t_5;
26021  Py_ssize_t *__pyx_t_6;
26022  __Pyx_RefNannySetupContext("__get__", 0);
26023 
26024  /* "View.MemoryView":572
26025  * @property
26026  * def suboffsets(self):
26027  * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
26028  * return (-1,) * self.view.ndim
26029  *
26030  */
26031  __pyx_t_1 = ((__pyx_v_self->view.suboffsets == NULL) != 0);
26032  if (__pyx_t_1) {
26033 
26034  /* "View.MemoryView":573
26035  * def suboffsets(self):
26036  * if self.view.suboffsets == NULL:
26037  * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
26038  *
26039  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
26040  */
26041  __Pyx_XDECREF(__pyx_r);
26042  __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error)
26043  __Pyx_GOTREF(__pyx_t_2);
26044  __pyx_t_3 = PyNumber_Multiply(__pyx_tuple__24, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error)
26045  __Pyx_GOTREF(__pyx_t_3);
26046  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26047  __pyx_r = __pyx_t_3;
26048  __pyx_t_3 = 0;
26049  goto __pyx_L0;
26050 
26051  /* "View.MemoryView":572
26052  * @property
26053  * def suboffsets(self):
26054  * if self.view.suboffsets == NULL: # <<<<<<<<<<<<<<
26055  * return (-1,) * self.view.ndim
26056  *
26057  */
26058  }
26059 
26060  /* "View.MemoryView":575
26061  * return (-1,) * self.view.ndim
26062  *
26063  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) # <<<<<<<<<<<<<<
26064  *
26065  * @property
26066  */
26067  __Pyx_XDECREF(__pyx_r);
26068  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 575, __pyx_L1_error)
26069  __Pyx_GOTREF(__pyx_t_3);
26070  __pyx_t_5 = (__pyx_v_self->view.suboffsets + __pyx_v_self->view.ndim);
26071  for (__pyx_t_6 = __pyx_v_self->view.suboffsets; __pyx_t_6 < __pyx_t_5; __pyx_t_6++) {
26072  __pyx_t_4 = __pyx_t_6;
26073  __pyx_v_suboffset = (__pyx_t_4[0]);
26074  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_suboffset); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error)
26075  __Pyx_GOTREF(__pyx_t_2);
26076  if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 575, __pyx_L1_error)
26077  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26078  }
26079  __pyx_t_2 = PyList_AsTuple(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error)
26080  __Pyx_GOTREF(__pyx_t_2);
26081  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26082  __pyx_r = __pyx_t_2;
26083  __pyx_t_2 = 0;
26084  goto __pyx_L0;
26085 
26086  /* "View.MemoryView":571
26087  *
26088  * @property
26089  * def suboffsets(self): # <<<<<<<<<<<<<<
26090  * if self.view.suboffsets == NULL:
26091  * return (-1,) * self.view.ndim
26092  */
26093 
26094  /* function exit code */
26095  __pyx_L1_error:;
26096  __Pyx_XDECREF(__pyx_t_2);
26097  __Pyx_XDECREF(__pyx_t_3);
26098  __Pyx_AddTraceback("View.MemoryView.memoryview.suboffsets.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26099  __pyx_r = NULL;
26100  __pyx_L0:;
26101  __Pyx_XGIVEREF(__pyx_r);
26102  __Pyx_RefNannyFinishContext();
26103  return __pyx_r;
26104 }
26105 
26106 /* "View.MemoryView":578
26107  *
26108  * @property
26109  * def ndim(self): # <<<<<<<<<<<<<<
26110  * return self.view.ndim
26111  *
26112  */
26113 
26114 /* Python wrapper */
26115 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self); /*proto*/
26116 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(PyObject *__pyx_v_self) {
26117  PyObject *__pyx_r = 0;
26118  __Pyx_RefNannyDeclarations
26119  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26120  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26121 
26122  /* function exit code */
26123  __Pyx_RefNannyFinishContext();
26124  return __pyx_r;
26125 }
26126 
26127 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4ndim___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
26128  PyObject *__pyx_r = NULL;
26129  __Pyx_RefNannyDeclarations
26130  PyObject *__pyx_t_1 = NULL;
26131  __Pyx_RefNannySetupContext("__get__", 0);
26132 
26133  /* "View.MemoryView":579
26134  * @property
26135  * def ndim(self):
26136  * return self.view.ndim # <<<<<<<<<<<<<<
26137  *
26138  * @property
26139  */
26140  __Pyx_XDECREF(__pyx_r);
26141  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->view.ndim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error)
26142  __Pyx_GOTREF(__pyx_t_1);
26143  __pyx_r = __pyx_t_1;
26144  __pyx_t_1 = 0;
26145  goto __pyx_L0;
26146 
26147  /* "View.MemoryView":578
26148  *
26149  * @property
26150  * def ndim(self): # <<<<<<<<<<<<<<
26151  * return self.view.ndim
26152  *
26153  */
26154 
26155  /* function exit code */
26156  __pyx_L1_error:;
26157  __Pyx_XDECREF(__pyx_t_1);
26158  __Pyx_AddTraceback("View.MemoryView.memoryview.ndim.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26159  __pyx_r = NULL;
26160  __pyx_L0:;
26161  __Pyx_XGIVEREF(__pyx_r);
26162  __Pyx_RefNannyFinishContext();
26163  return __pyx_r;
26164 }
26165 
26166 /* "View.MemoryView":582
26167  *
26168  * @property
26169  * def itemsize(self): # <<<<<<<<<<<<<<
26170  * return self.view.itemsize
26171  *
26172  */
26173 
26174 /* Python wrapper */
26175 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self); /*proto*/
26176 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(PyObject *__pyx_v_self) {
26177  PyObject *__pyx_r = 0;
26178  __Pyx_RefNannyDeclarations
26179  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26180  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26181 
26182  /* function exit code */
26183  __Pyx_RefNannyFinishContext();
26184  return __pyx_r;
26185 }
26186 
26187 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_8itemsize___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
26188  PyObject *__pyx_r = NULL;
26189  __Pyx_RefNannyDeclarations
26190  PyObject *__pyx_t_1 = NULL;
26191  __Pyx_RefNannySetupContext("__get__", 0);
26192 
26193  /* "View.MemoryView":583
26194  * @property
26195  * def itemsize(self):
26196  * return self.view.itemsize # <<<<<<<<<<<<<<
26197  *
26198  * @property
26199  */
26200  __Pyx_XDECREF(__pyx_r);
26201  __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
26202  __Pyx_GOTREF(__pyx_t_1);
26203  __pyx_r = __pyx_t_1;
26204  __pyx_t_1 = 0;
26205  goto __pyx_L0;
26206 
26207  /* "View.MemoryView":582
26208  *
26209  * @property
26210  * def itemsize(self): # <<<<<<<<<<<<<<
26211  * return self.view.itemsize
26212  *
26213  */
26214 
26215  /* function exit code */
26216  __pyx_L1_error:;
26217  __Pyx_XDECREF(__pyx_t_1);
26218  __Pyx_AddTraceback("View.MemoryView.memoryview.itemsize.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26219  __pyx_r = NULL;
26220  __pyx_L0:;
26221  __Pyx_XGIVEREF(__pyx_r);
26222  __Pyx_RefNannyFinishContext();
26223  return __pyx_r;
26224 }
26225 
26226 /* "View.MemoryView":586
26227  *
26228  * @property
26229  * def nbytes(self): # <<<<<<<<<<<<<<
26230  * return self.size * self.view.itemsize
26231  *
26232  */
26233 
26234 /* Python wrapper */
26235 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self); /*proto*/
26236 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(PyObject *__pyx_v_self) {
26237  PyObject *__pyx_r = 0;
26238  __Pyx_RefNannyDeclarations
26239  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26240  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26241 
26242  /* function exit code */
26243  __Pyx_RefNannyFinishContext();
26244  return __pyx_r;
26245 }
26246 
26247 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_6nbytes___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
26248  PyObject *__pyx_r = NULL;
26249  __Pyx_RefNannyDeclarations
26250  PyObject *__pyx_t_1 = NULL;
26251  PyObject *__pyx_t_2 = NULL;
26252  PyObject *__pyx_t_3 = NULL;
26253  __Pyx_RefNannySetupContext("__get__", 0);
26254 
26255  /* "View.MemoryView":587
26256  * @property
26257  * def nbytes(self):
26258  * return self.size * self.view.itemsize # <<<<<<<<<<<<<<
26259  *
26260  * @property
26261  */
26262  __Pyx_XDECREF(__pyx_r);
26263  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error)
26264  __Pyx_GOTREF(__pyx_t_1);
26265  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_self->view.itemsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 587, __pyx_L1_error)
26266  __Pyx_GOTREF(__pyx_t_2);
26267  __pyx_t_3 = PyNumber_Multiply(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error)
26268  __Pyx_GOTREF(__pyx_t_3);
26269  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26270  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26271  __pyx_r = __pyx_t_3;
26272  __pyx_t_3 = 0;
26273  goto __pyx_L0;
26274 
26275  /* "View.MemoryView":586
26276  *
26277  * @property
26278  * def nbytes(self): # <<<<<<<<<<<<<<
26279  * return self.size * self.view.itemsize
26280  *
26281  */
26282 
26283  /* function exit code */
26284  __pyx_L1_error:;
26285  __Pyx_XDECREF(__pyx_t_1);
26286  __Pyx_XDECREF(__pyx_t_2);
26287  __Pyx_XDECREF(__pyx_t_3);
26288  __Pyx_AddTraceback("View.MemoryView.memoryview.nbytes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26289  __pyx_r = NULL;
26290  __pyx_L0:;
26291  __Pyx_XGIVEREF(__pyx_r);
26292  __Pyx_RefNannyFinishContext();
26293  return __pyx_r;
26294 }
26295 
26296 /* "View.MemoryView":590
26297  *
26298  * @property
26299  * def size(self): # <<<<<<<<<<<<<<
26300  * if self._size is None:
26301  * result = 1
26302  */
26303 
26304 /* Python wrapper */
26305 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self); /*proto*/
26306 static PyObject *__pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(PyObject *__pyx_v_self) {
26307  PyObject *__pyx_r = 0;
26308  __Pyx_RefNannyDeclarations
26309  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
26310  __pyx_r = __pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26311 
26312  /* function exit code */
26313  __Pyx_RefNannyFinishContext();
26314  return __pyx_r;
26315 }
26316 
26317 static PyObject *__pyx_pf_15View_dot_MemoryView_10memoryview_4size___get__(struct __pyx_memoryview_obj *__pyx_v_self) {
26318  PyObject *__pyx_v_result = NULL;
26319  PyObject *__pyx_v_length = NULL;
26320  PyObject *__pyx_r = NULL;
26321  __Pyx_RefNannyDeclarations
26322  int __pyx_t_1;
26323  int __pyx_t_2;
26324  Py_ssize_t *__pyx_t_3;
26325  Py_ssize_t *__pyx_t_4;
26326  Py_ssize_t *__pyx_t_5;
26327  PyObject *__pyx_t_6 = NULL;
26328  __Pyx_RefNannySetupContext("__get__", 0);
26329 
26330  /* "View.MemoryView":591
26331  * @property
26332  * def size(self):
26333  * if self._size is None: # <<<<<<<<<<<<<<
26334  * result = 1
26335  *
26336  */
26337  __pyx_t_1 = (__pyx_v_self->_size == Py_None);
26338  __pyx_t_2 = (__pyx_t_1 != 0);
26339  if (__pyx_t_2) {
26340 
26341  /* "View.MemoryView":592
26342  * def size(self):
26343  * if self._size is None:
26344  * result = 1 # <<<<<<<<<<<<<<
26345  *
26346  * for length in self.view.shape[:self.view.ndim]:
26347  */
26348  __Pyx_INCREF(__pyx_int_1);
26349  __pyx_v_result = __pyx_int_1;
26350 
26351  /* "View.MemoryView":594
26352  * result = 1
26353  *
26354  * for length in self.view.shape[:self.view.ndim]: # <<<<<<<<<<<<<<
26355  * result *= length
26356  *
26357  */
26358  __pyx_t_4 = (__pyx_v_self->view.shape + __pyx_v_self->view.ndim);
26359  for (__pyx_t_5 = __pyx_v_self->view.shape; __pyx_t_5 < __pyx_t_4; __pyx_t_5++) {
26360  __pyx_t_3 = __pyx_t_5;
26361  __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_3[0])); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 594, __pyx_L1_error)
26362  __Pyx_GOTREF(__pyx_t_6);
26363  __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_6);
26364  __pyx_t_6 = 0;
26365 
26366  /* "View.MemoryView":595
26367  *
26368  * for length in self.view.shape[:self.view.ndim]:
26369  * result *= length # <<<<<<<<<<<<<<
26370  *
26371  * self._size = result
26372  */
26373  __pyx_t_6 = PyNumber_InPlaceMultiply(__pyx_v_result, __pyx_v_length); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 595, __pyx_L1_error)
26374  __Pyx_GOTREF(__pyx_t_6);
26375  __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_6);
26376  __pyx_t_6 = 0;
26377  }
26378 
26379  /* "View.MemoryView":597
26380  * result *= length
26381  *
26382  * self._size = result # <<<<<<<<<<<<<<
26383  *
26384  * return self._size
26385  */
26386  __Pyx_INCREF(__pyx_v_result);
26387  __Pyx_GIVEREF(__pyx_v_result);
26388  __Pyx_GOTREF(__pyx_v_self->_size);
26389  __Pyx_DECREF(__pyx_v_self->_size);
26390  __pyx_v_self->_size = __pyx_v_result;
26391 
26392  /* "View.MemoryView":591
26393  * @property
26394  * def size(self):
26395  * if self._size is None: # <<<<<<<<<<<<<<
26396  * result = 1
26397  *
26398  */
26399  }
26400 
26401  /* "View.MemoryView":599
26402  * self._size = result
26403  *
26404  * return self._size # <<<<<<<<<<<<<<
26405  *
26406  * def __len__(self):
26407  */
26408  __Pyx_XDECREF(__pyx_r);
26409  __Pyx_INCREF(__pyx_v_self->_size);
26410  __pyx_r = __pyx_v_self->_size;
26411  goto __pyx_L0;
26412 
26413  /* "View.MemoryView":590
26414  *
26415  * @property
26416  * def size(self): # <<<<<<<<<<<<<<
26417  * if self._size is None:
26418  * result = 1
26419  */
26420 
26421  /* function exit code */
26422  __pyx_L1_error:;
26423  __Pyx_XDECREF(__pyx_t_6);
26424  __Pyx_AddTraceback("View.MemoryView.memoryview.size.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26425  __pyx_r = NULL;
26426  __pyx_L0:;
26427  __Pyx_XDECREF(__pyx_v_result);
26428  __Pyx_XDECREF(__pyx_v_length);
26429  __Pyx_XGIVEREF(__pyx_r);
26430  __Pyx_RefNannyFinishContext();
26431  return __pyx_r;
26432 }
26433 
26434 /* "View.MemoryView":601
26435  * return self._size
26436  *
26437  * def __len__(self): # <<<<<<<<<<<<<<
26438  * if self.view.ndim >= 1:
26439  * return self.view.shape[0]
26440  */
26441 
26442 /* Python wrapper */
26443 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self); /*proto*/
26444 static Py_ssize_t __pyx_memoryview___len__(PyObject *__pyx_v_self) {
26445  Py_ssize_t __pyx_r;
26446  __Pyx_RefNannyDeclarations
26447  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
26448  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26449 
26450  /* function exit code */
26451  __Pyx_RefNannyFinishContext();
26452  return __pyx_r;
26453 }
26454 
26455 static Py_ssize_t __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_10__len__(struct __pyx_memoryview_obj *__pyx_v_self) {
26456  Py_ssize_t __pyx_r;
26457  __Pyx_RefNannyDeclarations
26458  int __pyx_t_1;
26459  __Pyx_RefNannySetupContext("__len__", 0);
26460 
26461  /* "View.MemoryView":602
26462  *
26463  * def __len__(self):
26464  * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
26465  * return self.view.shape[0]
26466  *
26467  */
26468  __pyx_t_1 = ((__pyx_v_self->view.ndim >= 1) != 0);
26469  if (__pyx_t_1) {
26470 
26471  /* "View.MemoryView":603
26472  * def __len__(self):
26473  * if self.view.ndim >= 1:
26474  * return self.view.shape[0] # <<<<<<<<<<<<<<
26475  *
26476  * return 0
26477  */
26478  __pyx_r = (__pyx_v_self->view.shape[0]);
26479  goto __pyx_L0;
26480 
26481  /* "View.MemoryView":602
26482  *
26483  * def __len__(self):
26484  * if self.view.ndim >= 1: # <<<<<<<<<<<<<<
26485  * return self.view.shape[0]
26486  *
26487  */
26488  }
26489 
26490  /* "View.MemoryView":605
26491  * return self.view.shape[0]
26492  *
26493  * return 0 # <<<<<<<<<<<<<<
26494  *
26495  * def __repr__(self):
26496  */
26497  __pyx_r = 0;
26498  goto __pyx_L0;
26499 
26500  /* "View.MemoryView":601
26501  * return self._size
26502  *
26503  * def __len__(self): # <<<<<<<<<<<<<<
26504  * if self.view.ndim >= 1:
26505  * return self.view.shape[0]
26506  */
26507 
26508  /* function exit code */
26509  __pyx_L0:;
26510  __Pyx_RefNannyFinishContext();
26511  return __pyx_r;
26512 }
26513 
26514 /* "View.MemoryView":607
26515  * return 0
26516  *
26517  * def __repr__(self): # <<<<<<<<<<<<<<
26518  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
26519  * id(self))
26520  */
26521 
26522 /* Python wrapper */
26523 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self); /*proto*/
26524 static PyObject *__pyx_memoryview___repr__(PyObject *__pyx_v_self) {
26525  PyObject *__pyx_r = 0;
26526  __Pyx_RefNannyDeclarations
26527  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
26528  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26529 
26530  /* function exit code */
26531  __Pyx_RefNannyFinishContext();
26532  return __pyx_r;
26533 }
26534 
26535 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_12__repr__(struct __pyx_memoryview_obj *__pyx_v_self) {
26536  PyObject *__pyx_r = NULL;
26537  __Pyx_RefNannyDeclarations
26538  PyObject *__pyx_t_1 = NULL;
26539  PyObject *__pyx_t_2 = NULL;
26540  PyObject *__pyx_t_3 = NULL;
26541  __Pyx_RefNannySetupContext("__repr__", 0);
26542 
26543  /* "View.MemoryView":608
26544  *
26545  * def __repr__(self):
26546  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
26547  * id(self))
26548  *
26549  */
26550  __Pyx_XDECREF(__pyx_r);
26551  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
26552  __Pyx_GOTREF(__pyx_t_1);
26553  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
26554  __Pyx_GOTREF(__pyx_t_2);
26555  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26556  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
26557  __Pyx_GOTREF(__pyx_t_1);
26558  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26559 
26560  /* "View.MemoryView":609
26561  * def __repr__(self):
26562  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
26563  * id(self)) # <<<<<<<<<<<<<<
26564  *
26565  * def __str__(self):
26566  */
26567  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_id, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error)
26568  __Pyx_GOTREF(__pyx_t_2);
26569 
26570  /* "View.MemoryView":608
26571  *
26572  * def __repr__(self):
26573  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__, # <<<<<<<<<<<<<<
26574  * id(self))
26575  *
26576  */
26577  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 608, __pyx_L1_error)
26578  __Pyx_GOTREF(__pyx_t_3);
26579  __Pyx_GIVEREF(__pyx_t_1);
26580  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
26581  __Pyx_GIVEREF(__pyx_t_2);
26582  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
26583  __pyx_t_1 = 0;
26584  __pyx_t_2 = 0;
26585  __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
26586  __Pyx_GOTREF(__pyx_t_2);
26587  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
26588  __pyx_r = __pyx_t_2;
26589  __pyx_t_2 = 0;
26590  goto __pyx_L0;
26591 
26592  /* "View.MemoryView":607
26593  * return 0
26594  *
26595  * def __repr__(self): # <<<<<<<<<<<<<<
26596  * return "<MemoryView of %r at 0x%x>" % (self.base.__class__.__name__,
26597  * id(self))
26598  */
26599 
26600  /* function exit code */
26601  __pyx_L1_error:;
26602  __Pyx_XDECREF(__pyx_t_1);
26603  __Pyx_XDECREF(__pyx_t_2);
26604  __Pyx_XDECREF(__pyx_t_3);
26605  __Pyx_AddTraceback("View.MemoryView.memoryview.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26606  __pyx_r = NULL;
26607  __pyx_L0:;
26608  __Pyx_XGIVEREF(__pyx_r);
26609  __Pyx_RefNannyFinishContext();
26610  return __pyx_r;
26611 }
26612 
26613 /* "View.MemoryView":611
26614  * id(self))
26615  *
26616  * def __str__(self): # <<<<<<<<<<<<<<
26617  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
26618  *
26619  */
26620 
26621 /* Python wrapper */
26622 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self); /*proto*/
26623 static PyObject *__pyx_memoryview___str__(PyObject *__pyx_v_self) {
26624  PyObject *__pyx_r = 0;
26625  __Pyx_RefNannyDeclarations
26626  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
26627  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(((struct __pyx_memoryview_obj *)__pyx_v_self));
26628 
26629  /* function exit code */
26630  __Pyx_RefNannyFinishContext();
26631  return __pyx_r;
26632 }
26633 
26634 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_14__str__(struct __pyx_memoryview_obj *__pyx_v_self) {
26635  PyObject *__pyx_r = NULL;
26636  __Pyx_RefNannyDeclarations
26637  PyObject *__pyx_t_1 = NULL;
26638  PyObject *__pyx_t_2 = NULL;
26639  __Pyx_RefNannySetupContext("__str__", 0);
26640 
26641  /* "View.MemoryView":612
26642  *
26643  * def __str__(self):
26644  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,) # <<<<<<<<<<<<<<
26645  *
26646  *
26647  */
26648  __Pyx_XDECREF(__pyx_r);
26649  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
26650  __Pyx_GOTREF(__pyx_t_1);
26651  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
26652  __Pyx_GOTREF(__pyx_t_2);
26653  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26654  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
26655  __Pyx_GOTREF(__pyx_t_1);
26656  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26657  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
26658  __Pyx_GOTREF(__pyx_t_2);
26659  __Pyx_GIVEREF(__pyx_t_1);
26660  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
26661  __pyx_t_1 = 0;
26662  __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_MemoryView_of_r_object, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
26663  __Pyx_GOTREF(__pyx_t_1);
26664  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
26665  __pyx_r = __pyx_t_1;
26666  __pyx_t_1 = 0;
26667  goto __pyx_L0;
26668 
26669  /* "View.MemoryView":611
26670  * id(self))
26671  *
26672  * def __str__(self): # <<<<<<<<<<<<<<
26673  * return "<MemoryView of %r object>" % (self.base.__class__.__name__,)
26674  *
26675  */
26676 
26677  /* function exit code */
26678  __pyx_L1_error:;
26679  __Pyx_XDECREF(__pyx_t_1);
26680  __Pyx_XDECREF(__pyx_t_2);
26681  __Pyx_AddTraceback("View.MemoryView.memoryview.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
26682  __pyx_r = NULL;
26683  __pyx_L0:;
26684  __Pyx_XGIVEREF(__pyx_r);
26685  __Pyx_RefNannyFinishContext();
26686  return __pyx_r;
26687 }
26688 
26689 /* "View.MemoryView":615
26690  *
26691  *
26692  * def is_c_contig(self): # <<<<<<<<<<<<<<
26693  * cdef __Pyx_memviewslice *mslice
26694  * cdef __Pyx_memviewslice tmp
26695  */
26696 
26697 /* Python wrapper */
26698 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
26699 static PyObject *__pyx_memoryview_is_c_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
26700  PyObject *__pyx_r = 0;
26701  __Pyx_RefNannyDeclarations
26702  __Pyx_RefNannySetupContext("is_c_contig (wrapper)", 0);
26703  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
26704 
26705  /* function exit code */
26706  __Pyx_RefNannyFinishContext();
26707  return __pyx_r;
26708 }
26709 
26710 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_16is_c_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
26711  __Pyx_memviewslice *__pyx_v_mslice;
26712  __Pyx_memviewslice __pyx_v_tmp;
26713  PyObject *__pyx_r = NULL;
26714  __Pyx_RefNannyDeclarations
26715  PyObject *__pyx_t_1 = NULL;
26716  __Pyx_RefNannySetupContext("is_c_contig", 0);
26717 
26718  /* "View.MemoryView":618
26719  * cdef __Pyx_memviewslice *mslice
26720  * cdef __Pyx_memviewslice tmp
26721  * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
26722  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
26723  *
26724  */
26725  __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp));
26726 
26727  /* "View.MemoryView":619
26728  * cdef __Pyx_memviewslice tmp
26729  * mslice = get_slice_from_memview(self, &tmp)
26730  * return slice_is_contig(mslice[0], 'C', self.view.ndim) # <<<<<<<<<<<<<<
26731  *
26732  * def is_f_contig(self):
26733  */
26734  __Pyx_XDECREF(__pyx_r);
26735  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'C', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
26736  __Pyx_GOTREF(__pyx_t_1);
26737  __pyx_r = __pyx_t_1;
26738  __pyx_t_1 = 0;
26739  goto __pyx_L0;
26740 
26741  /* "View.MemoryView":615
26742  *
26743  *
26744  * def is_c_contig(self): # <<<<<<<<<<<<<<
26745  * cdef __Pyx_memviewslice *mslice
26746  * cdef __Pyx_memviewslice tmp
26747  */
26748 
26749  /* function exit code */
26750  __pyx_L1_error:;
26751  __Pyx_XDECREF(__pyx_t_1);
26752  __Pyx_AddTraceback("View.MemoryView.memoryview.is_c_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
26753  __pyx_r = NULL;
26754  __pyx_L0:;
26755  __Pyx_XGIVEREF(__pyx_r);
26756  __Pyx_RefNannyFinishContext();
26757  return __pyx_r;
26758 }
26759 
26760 /* "View.MemoryView":621
26761  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
26762  *
26763  * def is_f_contig(self): # <<<<<<<<<<<<<<
26764  * cdef __Pyx_memviewslice *mslice
26765  * cdef __Pyx_memviewslice tmp
26766  */
26767 
26768 /* Python wrapper */
26769 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
26770 static PyObject *__pyx_memoryview_is_f_contig(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
26771  PyObject *__pyx_r = 0;
26772  __Pyx_RefNannyDeclarations
26773  __Pyx_RefNannySetupContext("is_f_contig (wrapper)", 0);
26774  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(((struct __pyx_memoryview_obj *)__pyx_v_self));
26775 
26776  /* function exit code */
26777  __Pyx_RefNannyFinishContext();
26778  return __pyx_r;
26779 }
26780 
26781 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_18is_f_contig(struct __pyx_memoryview_obj *__pyx_v_self) {
26782  __Pyx_memviewslice *__pyx_v_mslice;
26783  __Pyx_memviewslice __pyx_v_tmp;
26784  PyObject *__pyx_r = NULL;
26785  __Pyx_RefNannyDeclarations
26786  PyObject *__pyx_t_1 = NULL;
26787  __Pyx_RefNannySetupContext("is_f_contig", 0);
26788 
26789  /* "View.MemoryView":624
26790  * cdef __Pyx_memviewslice *mslice
26791  * cdef __Pyx_memviewslice tmp
26792  * mslice = get_slice_from_memview(self, &tmp) # <<<<<<<<<<<<<<
26793  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
26794  *
26795  */
26796  __pyx_v_mslice = __pyx_memoryview_get_slice_from_memoryview(__pyx_v_self, (&__pyx_v_tmp));
26797 
26798  /* "View.MemoryView":625
26799  * cdef __Pyx_memviewslice tmp
26800  * mslice = get_slice_from_memview(self, &tmp)
26801  * return slice_is_contig(mslice[0], 'F', self.view.ndim) # <<<<<<<<<<<<<<
26802  *
26803  * def copy(self):
26804  */
26805  __Pyx_XDECREF(__pyx_r);
26806  __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_memviewslice_is_contig((__pyx_v_mslice[0]), 'F', __pyx_v_self->view.ndim)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error)
26807  __Pyx_GOTREF(__pyx_t_1);
26808  __pyx_r = __pyx_t_1;
26809  __pyx_t_1 = 0;
26810  goto __pyx_L0;
26811 
26812  /* "View.MemoryView":621
26813  * return slice_is_contig(mslice[0], 'C', self.view.ndim)
26814  *
26815  * def is_f_contig(self): # <<<<<<<<<<<<<<
26816  * cdef __Pyx_memviewslice *mslice
26817  * cdef __Pyx_memviewslice tmp
26818  */
26819 
26820  /* function exit code */
26821  __pyx_L1_error:;
26822  __Pyx_XDECREF(__pyx_t_1);
26823  __Pyx_AddTraceback("View.MemoryView.memoryview.is_f_contig", __pyx_clineno, __pyx_lineno, __pyx_filename);
26824  __pyx_r = NULL;
26825  __pyx_L0:;
26826  __Pyx_XGIVEREF(__pyx_r);
26827  __Pyx_RefNannyFinishContext();
26828  return __pyx_r;
26829 }
26830 
26831 /* "View.MemoryView":627
26832  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
26833  *
26834  * def copy(self): # <<<<<<<<<<<<<<
26835  * cdef __Pyx_memviewslice mslice
26836  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
26837  */
26838 
26839 /* Python wrapper */
26840 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
26841 static PyObject *__pyx_memoryview_copy(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
26842  PyObject *__pyx_r = 0;
26843  __Pyx_RefNannyDeclarations
26844  __Pyx_RefNannySetupContext("copy (wrapper)", 0);
26845  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(((struct __pyx_memoryview_obj *)__pyx_v_self));
26846 
26847  /* function exit code */
26848  __Pyx_RefNannyFinishContext();
26849  return __pyx_r;
26850 }
26851 
26852 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_20copy(struct __pyx_memoryview_obj *__pyx_v_self) {
26853  __Pyx_memviewslice __pyx_v_mslice;
26854  int __pyx_v_flags;
26855  PyObject *__pyx_r = NULL;
26856  __Pyx_RefNannyDeclarations
26857  __Pyx_memviewslice __pyx_t_1;
26858  PyObject *__pyx_t_2 = NULL;
26859  __Pyx_RefNannySetupContext("copy", 0);
26860 
26861  /* "View.MemoryView":629
26862  * def copy(self):
26863  * cdef __Pyx_memviewslice mslice
26864  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS # <<<<<<<<<<<<<<
26865  *
26866  * slice_copy(self, &mslice)
26867  */
26868  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_F_CONTIGUOUS));
26869 
26870  /* "View.MemoryView":631
26871  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
26872  *
26873  * slice_copy(self, &mslice) # <<<<<<<<<<<<<<
26874  * mslice = slice_copy_contig(&mslice, "c", self.view.ndim,
26875  * self.view.itemsize,
26876  */
26877  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_mslice));
26878 
26879  /* "View.MemoryView":632
26880  *
26881  * slice_copy(self, &mslice)
26882  * mslice = slice_copy_contig(&mslice, "c", self.view.ndim, # <<<<<<<<<<<<<<
26883  * self.view.itemsize,
26884  * flags|PyBUF_C_CONTIGUOUS,
26885  */
26886  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_mslice), ((char *)"c"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_C_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 632, __pyx_L1_error)
26887  __pyx_v_mslice = __pyx_t_1;
26888 
26889  /* "View.MemoryView":637
26890  * self.dtype_is_object)
26891  *
26892  * return memoryview_copy_from_slice(self, &mslice) # <<<<<<<<<<<<<<
26893  *
26894  * def copy_fortran(self):
26895  */
26896  __Pyx_XDECREF(__pyx_r);
26897  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_mslice)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error)
26898  __Pyx_GOTREF(__pyx_t_2);
26899  __pyx_r = __pyx_t_2;
26900  __pyx_t_2 = 0;
26901  goto __pyx_L0;
26902 
26903  /* "View.MemoryView":627
26904  * return slice_is_contig(mslice[0], 'F', self.view.ndim)
26905  *
26906  * def copy(self): # <<<<<<<<<<<<<<
26907  * cdef __Pyx_memviewslice mslice
26908  * cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS
26909  */
26910 
26911  /* function exit code */
26912  __pyx_L1_error:;
26913  __Pyx_XDECREF(__pyx_t_2);
26914  __Pyx_AddTraceback("View.MemoryView.memoryview.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
26915  __pyx_r = NULL;
26916  __pyx_L0:;
26917  __Pyx_XGIVEREF(__pyx_r);
26918  __Pyx_RefNannyFinishContext();
26919  return __pyx_r;
26920 }
26921 
26922 /* "View.MemoryView":639
26923  * return memoryview_copy_from_slice(self, &mslice)
26924  *
26925  * def copy_fortran(self): # <<<<<<<<<<<<<<
26926  * cdef __Pyx_memviewslice src, dst
26927  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
26928  */
26929 
26930 /* Python wrapper */
26931 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
26932 static PyObject *__pyx_memoryview_copy_fortran(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
26933  PyObject *__pyx_r = 0;
26934  __Pyx_RefNannyDeclarations
26935  __Pyx_RefNannySetupContext("copy_fortran (wrapper)", 0);
26936  __pyx_r = __pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(((struct __pyx_memoryview_obj *)__pyx_v_self));
26937 
26938  /* function exit code */
26939  __Pyx_RefNannyFinishContext();
26940  return __pyx_r;
26941 }
26942 
26943 static PyObject *__pyx_memoryview___pyx_pf_15View_dot_MemoryView_10memoryview_22copy_fortran(struct __pyx_memoryview_obj *__pyx_v_self) {
26944  __Pyx_memviewslice __pyx_v_src;
26945  __Pyx_memviewslice __pyx_v_dst;
26946  int __pyx_v_flags;
26947  PyObject *__pyx_r = NULL;
26948  __Pyx_RefNannyDeclarations
26949  __Pyx_memviewslice __pyx_t_1;
26950  PyObject *__pyx_t_2 = NULL;
26951  __Pyx_RefNannySetupContext("copy_fortran", 0);
26952 
26953  /* "View.MemoryView":641
26954  * def copy_fortran(self):
26955  * cdef __Pyx_memviewslice src, dst
26956  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS # <<<<<<<<<<<<<<
26957  *
26958  * slice_copy(self, &src)
26959  */
26960  __pyx_v_flags = (__pyx_v_self->flags & (~PyBUF_C_CONTIGUOUS));
26961 
26962  /* "View.MemoryView":643
26963  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
26964  *
26965  * slice_copy(self, &src) # <<<<<<<<<<<<<<
26966  * dst = slice_copy_contig(&src, "fortran", self.view.ndim,
26967  * self.view.itemsize,
26968  */
26969  __pyx_memoryview_slice_copy(__pyx_v_self, (&__pyx_v_src));
26970 
26971  /* "View.MemoryView":644
26972  *
26973  * slice_copy(self, &src)
26974  * dst = slice_copy_contig(&src, "fortran", self.view.ndim, # <<<<<<<<<<<<<<
26975  * self.view.itemsize,
26976  * flags|PyBUF_F_CONTIGUOUS,
26977  */
26978  __pyx_t_1 = __pyx_memoryview_copy_new_contig((&__pyx_v_src), ((char *)"fortran"), __pyx_v_self->view.ndim, __pyx_v_self->view.itemsize, (__pyx_v_flags | PyBUF_F_CONTIGUOUS), __pyx_v_self->dtype_is_object); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 644, __pyx_L1_error)
26979  __pyx_v_dst = __pyx_t_1;
26980 
26981  /* "View.MemoryView":649
26982  * self.dtype_is_object)
26983  *
26984  * return memoryview_copy_from_slice(self, &dst) # <<<<<<<<<<<<<<
26985  *
26986  *
26987  */
26988  __Pyx_XDECREF(__pyx_r);
26989  __pyx_t_2 = __pyx_memoryview_copy_object_from_slice(__pyx_v_self, (&__pyx_v_dst)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 649, __pyx_L1_error)
26990  __Pyx_GOTREF(__pyx_t_2);
26991  __pyx_r = __pyx_t_2;
26992  __pyx_t_2 = 0;
26993  goto __pyx_L0;
26994 
26995  /* "View.MemoryView":639
26996  * return memoryview_copy_from_slice(self, &mslice)
26997  *
26998  * def copy_fortran(self): # <<<<<<<<<<<<<<
26999  * cdef __Pyx_memviewslice src, dst
27000  * cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS
27001  */
27002 
27003  /* function exit code */
27004  __pyx_L1_error:;
27005  __Pyx_XDECREF(__pyx_t_2);
27006  __Pyx_AddTraceback("View.MemoryView.memoryview.copy_fortran", __pyx_clineno, __pyx_lineno, __pyx_filename);
27007  __pyx_r = NULL;
27008  __pyx_L0:;
27009  __Pyx_XGIVEREF(__pyx_r);
27010  __Pyx_RefNannyFinishContext();
27011  return __pyx_r;
27012 }
27013 
27014 /* "(tree fragment)":1
27015  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
27016  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27017  * def __setstate_cython__(self, __pyx_state):
27018  */
27019 
27020 /* Python wrapper */
27021 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
27022 static PyObject *__pyx_pw___pyx_memoryview_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
27023  PyObject *__pyx_r = 0;
27024  __Pyx_RefNannyDeclarations
27025  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
27026  __pyx_r = __pyx_pf___pyx_memoryview___reduce_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self));
27027 
27028  /* function exit code */
27029  __Pyx_RefNannyFinishContext();
27030  return __pyx_r;
27031 }
27032 
27033 static PyObject *__pyx_pf___pyx_memoryview___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self) {
27034  PyObject *__pyx_r = NULL;
27035  __Pyx_RefNannyDeclarations
27036  PyObject *__pyx_t_1 = NULL;
27037  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
27038 
27039  /* "(tree fragment)":2
27040  * def __reduce_cython__(self):
27041  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
27042  * def __setstate_cython__(self, __pyx_state):
27043  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27044  */
27045  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
27046  __Pyx_GOTREF(__pyx_t_1);
27047  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
27048  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27049  __PYX_ERR(0, 2, __pyx_L1_error)
27050 
27051  /* "(tree fragment)":1
27052  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
27053  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27054  * def __setstate_cython__(self, __pyx_state):
27055  */
27056 
27057  /* function exit code */
27058  __pyx_L1_error:;
27059  __Pyx_XDECREF(__pyx_t_1);
27060  __Pyx_AddTraceback("View.MemoryView.memoryview.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27061  __pyx_r = NULL;
27062  __Pyx_XGIVEREF(__pyx_r);
27063  __Pyx_RefNannyFinishContext();
27064  return __pyx_r;
27065 }
27066 
27067 /* "(tree fragment)":3
27068  * def __reduce_cython__(self):
27069  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27070  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
27071  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27072  */
27073 
27074 /* Python wrapper */
27075 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
27076 static PyObject *__pyx_pw___pyx_memoryview_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
27077  PyObject *__pyx_r = 0;
27078  __Pyx_RefNannyDeclarations
27079  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
27080  __pyx_r = __pyx_pf___pyx_memoryview_2__setstate_cython__(((struct __pyx_memoryview_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
27081 
27082  /* function exit code */
27083  __Pyx_RefNannyFinishContext();
27084  return __pyx_r;
27085 }
27086 
27087 static PyObject *__pyx_pf___pyx_memoryview_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryview_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
27088  PyObject *__pyx_r = NULL;
27089  __Pyx_RefNannyDeclarations
27090  PyObject *__pyx_t_1 = NULL;
27091  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
27092 
27093  /* "(tree fragment)":4
27094  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27095  * def __setstate_cython__(self, __pyx_state):
27096  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
27097  */
27098  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
27099  __Pyx_GOTREF(__pyx_t_1);
27100  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
27101  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
27102  __PYX_ERR(0, 4, __pyx_L1_error)
27103 
27104  /* "(tree fragment)":3
27105  * def __reduce_cython__(self):
27106  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27107  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
27108  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
27109  */
27110 
27111  /* function exit code */
27112  __pyx_L1_error:;
27113  __Pyx_XDECREF(__pyx_t_1);
27114  __Pyx_AddTraceback("View.MemoryView.memoryview.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
27115  __pyx_r = NULL;
27116  __Pyx_XGIVEREF(__pyx_r);
27117  __Pyx_RefNannyFinishContext();
27118  return __pyx_r;
27119 }
27120 
27121 /* "View.MemoryView":653
27122  *
27123  * @cname('__pyx_memoryview_new')
27124  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
27125  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
27126  * result.typeinfo = typeinfo
27127  */
27128 
27129 static PyObject *__pyx_memoryview_new(PyObject *__pyx_v_o, int __pyx_v_flags, int __pyx_v_dtype_is_object, __Pyx_TypeInfo *__pyx_v_typeinfo) {
27130  struct __pyx_memoryview_obj *__pyx_v_result = 0;
27131  PyObject *__pyx_r = NULL;
27132  __Pyx_RefNannyDeclarations
27133  PyObject *__pyx_t_1 = NULL;
27134  PyObject *__pyx_t_2 = NULL;
27135  PyObject *__pyx_t_3 = NULL;
27136  __Pyx_RefNannySetupContext("memoryview_cwrapper", 0);
27137 
27138  /* "View.MemoryView":654
27139  * @cname('__pyx_memoryview_new')
27140  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
27141  * cdef memoryview result = memoryview(o, flags, dtype_is_object) # <<<<<<<<<<<<<<
27142  * result.typeinfo = typeinfo
27143  * return result
27144  */
27145  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
27146  __Pyx_GOTREF(__pyx_t_1);
27147  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error)
27148  __Pyx_GOTREF(__pyx_t_2);
27149  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 654, __pyx_L1_error)
27150  __Pyx_GOTREF(__pyx_t_3);
27151  __Pyx_INCREF(__pyx_v_o);
27152  __Pyx_GIVEREF(__pyx_v_o);
27153  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_o);
27154  __Pyx_GIVEREF(__pyx_t_1);
27155  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
27156  __Pyx_GIVEREF(__pyx_t_2);
27157  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
27158  __pyx_t_1 = 0;
27159  __pyx_t_2 = 0;
27160  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryview_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error)
27161  __Pyx_GOTREF(__pyx_t_2);
27162  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27163  __pyx_v_result = ((struct __pyx_memoryview_obj *)__pyx_t_2);
27164  __pyx_t_2 = 0;
27165 
27166  /* "View.MemoryView":655
27167  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo):
27168  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
27169  * result.typeinfo = typeinfo # <<<<<<<<<<<<<<
27170  * return result
27171  *
27172  */
27173  __pyx_v_result->typeinfo = __pyx_v_typeinfo;
27174 
27175  /* "View.MemoryView":656
27176  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
27177  * result.typeinfo = typeinfo
27178  * return result # <<<<<<<<<<<<<<
27179  *
27180  * @cname('__pyx_memoryview_check')
27181  */
27182  __Pyx_XDECREF(__pyx_r);
27183  __Pyx_INCREF(((PyObject *)__pyx_v_result));
27184  __pyx_r = ((PyObject *)__pyx_v_result);
27185  goto __pyx_L0;
27186 
27187  /* "View.MemoryView":653
27188  *
27189  * @cname('__pyx_memoryview_new')
27190  * cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): # <<<<<<<<<<<<<<
27191  * cdef memoryview result = memoryview(o, flags, dtype_is_object)
27192  * result.typeinfo = typeinfo
27193  */
27194 
27195  /* function exit code */
27196  __pyx_L1_error:;
27197  __Pyx_XDECREF(__pyx_t_1);
27198  __Pyx_XDECREF(__pyx_t_2);
27199  __Pyx_XDECREF(__pyx_t_3);
27200  __Pyx_AddTraceback("View.MemoryView.memoryview_cwrapper", __pyx_clineno, __pyx_lineno, __pyx_filename);
27201  __pyx_r = 0;
27202  __pyx_L0:;
27203  __Pyx_XDECREF((PyObject *)__pyx_v_result);
27204  __Pyx_XGIVEREF(__pyx_r);
27205  __Pyx_RefNannyFinishContext();
27206  return __pyx_r;
27207 }
27208 
27209 /* "View.MemoryView":659
27210  *
27211  * @cname('__pyx_memoryview_check')
27212  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
27213  * return isinstance(o, memoryview)
27214  *
27215  */
27216 
27217 static CYTHON_INLINE int __pyx_memoryview_check(PyObject *__pyx_v_o) {
27218  int __pyx_r;
27219  __Pyx_RefNannyDeclarations
27220  int __pyx_t_1;
27221  __Pyx_RefNannySetupContext("memoryview_check", 0);
27222 
27223  /* "View.MemoryView":660
27224  * @cname('__pyx_memoryview_check')
27225  * cdef inline bint memoryview_check(object o):
27226  * return isinstance(o, memoryview) # <<<<<<<<<<<<<<
27227  *
27228  * cdef tuple _unellipsify(object index, int ndim):
27229  */
27230  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_o, __pyx_memoryview_type);
27231  __pyx_r = __pyx_t_1;
27232  goto __pyx_L0;
27233 
27234  /* "View.MemoryView":659
27235  *
27236  * @cname('__pyx_memoryview_check')
27237  * cdef inline bint memoryview_check(object o): # <<<<<<<<<<<<<<
27238  * return isinstance(o, memoryview)
27239  *
27240  */
27241 
27242  /* function exit code */
27243  __pyx_L0:;
27244  __Pyx_RefNannyFinishContext();
27245  return __pyx_r;
27246 }
27247 
27248 /* "View.MemoryView":662
27249  * return isinstance(o, memoryview)
27250  *
27251  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
27252  * """
27253  * Replace all ellipses with full slices and fill incomplete indices with
27254  */
27255 
27256 static PyObject *_unellipsify(PyObject *__pyx_v_index, int __pyx_v_ndim) {
27257  PyObject *__pyx_v_tup = NULL;
27258  PyObject *__pyx_v_result = NULL;
27259  int __pyx_v_have_slices;
27260  int __pyx_v_seen_ellipsis;
27261  CYTHON_UNUSED PyObject *__pyx_v_idx = NULL;
27262  PyObject *__pyx_v_item = NULL;
27263  Py_ssize_t __pyx_v_nslices;
27264  PyObject *__pyx_r = NULL;
27265  __Pyx_RefNannyDeclarations
27266  int __pyx_t_1;
27267  int __pyx_t_2;
27268  PyObject *__pyx_t_3 = NULL;
27269  PyObject *__pyx_t_4 = NULL;
27270  Py_ssize_t __pyx_t_5;
27271  PyObject *(*__pyx_t_6)(PyObject *);
27272  PyObject *__pyx_t_7 = NULL;
27273  Py_ssize_t __pyx_t_8;
27274  int __pyx_t_9;
27275  int __pyx_t_10;
27276  PyObject *__pyx_t_11 = NULL;
27277  __Pyx_RefNannySetupContext("_unellipsify", 0);
27278 
27279  /* "View.MemoryView":667
27280  * full slices.
27281  * """
27282  * if not isinstance(index, tuple): # <<<<<<<<<<<<<<
27283  * tup = (index,)
27284  * else:
27285  */
27286  __pyx_t_1 = PyTuple_Check(__pyx_v_index);
27287  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
27288  if (__pyx_t_2) {
27289 
27290  /* "View.MemoryView":668
27291  * """
27292  * if not isinstance(index, tuple):
27293  * tup = (index,) # <<<<<<<<<<<<<<
27294  * else:
27295  * tup = index
27296  */
27297  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 668, __pyx_L1_error)
27298  __Pyx_GOTREF(__pyx_t_3);
27299  __Pyx_INCREF(__pyx_v_index);
27300  __Pyx_GIVEREF(__pyx_v_index);
27301  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index);
27302  __pyx_v_tup = __pyx_t_3;
27303  __pyx_t_3 = 0;
27304 
27305  /* "View.MemoryView":667
27306  * full slices.
27307  * """
27308  * if not isinstance(index, tuple): # <<<<<<<<<<<<<<
27309  * tup = (index,)
27310  * else:
27311  */
27312  goto __pyx_L3;
27313  }
27314 
27315  /* "View.MemoryView":670
27316  * tup = (index,)
27317  * else:
27318  * tup = index # <<<<<<<<<<<<<<
27319  *
27320  * result = []
27321  */
27322  /*else*/ {
27323  __Pyx_INCREF(__pyx_v_index);
27324  __pyx_v_tup = __pyx_v_index;
27325  }
27326  __pyx_L3:;
27327 
27328  /* "View.MemoryView":672
27329  * tup = index
27330  *
27331  * result = [] # <<<<<<<<<<<<<<
27332  * have_slices = False
27333  * seen_ellipsis = False
27334  */
27335  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error)
27336  __Pyx_GOTREF(__pyx_t_3);
27337  __pyx_v_result = ((PyObject*)__pyx_t_3);
27338  __pyx_t_3 = 0;
27339 
27340  /* "View.MemoryView":673
27341  *
27342  * result = []
27343  * have_slices = False # <<<<<<<<<<<<<<
27344  * seen_ellipsis = False
27345  * for idx, item in enumerate(tup):
27346  */
27347  __pyx_v_have_slices = 0;
27348 
27349  /* "View.MemoryView":674
27350  * result = []
27351  * have_slices = False
27352  * seen_ellipsis = False # <<<<<<<<<<<<<<
27353  * for idx, item in enumerate(tup):
27354  * if item is Ellipsis:
27355  */
27356  __pyx_v_seen_ellipsis = 0;
27357 
27358  /* "View.MemoryView":675
27359  * have_slices = False
27360  * seen_ellipsis = False
27361  * for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
27362  * if item is Ellipsis:
27363  * if not seen_ellipsis:
27364  */
27365  __Pyx_INCREF(__pyx_int_0);
27366  __pyx_t_3 = __pyx_int_0;
27367  if (likely(PyList_CheckExact(__pyx_v_tup)) || PyTuple_CheckExact(__pyx_v_tup)) {
27368  __pyx_t_4 = __pyx_v_tup; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0;
27369  __pyx_t_6 = NULL;
27370  } else {
27371  __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_tup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 675, __pyx_L1_error)
27372  __Pyx_GOTREF(__pyx_t_4);
27373  __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 675, __pyx_L1_error)
27374  }
27375  for (;;) {
27376  if (likely(!__pyx_t_6)) {
27377  if (likely(PyList_CheckExact(__pyx_t_4))) {
27378  if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break;
27379  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27380  __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 675, __pyx_L1_error)
27381  #else
27382  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 675, __pyx_L1_error)
27383  __Pyx_GOTREF(__pyx_t_7);
27384  #endif
27385  } else {
27386  if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
27387  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27388  __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 675, __pyx_L1_error)
27389  #else
27390  __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 675, __pyx_L1_error)
27391  __Pyx_GOTREF(__pyx_t_7);
27392  #endif
27393  }
27394  } else {
27395  __pyx_t_7 = __pyx_t_6(__pyx_t_4);
27396  if (unlikely(!__pyx_t_7)) {
27397  PyObject* exc_type = PyErr_Occurred();
27398  if (exc_type) {
27399  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
27400  else __PYX_ERR(0, 675, __pyx_L1_error)
27401  }
27402  break;
27403  }
27404  __Pyx_GOTREF(__pyx_t_7);
27405  }
27406  __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_7);
27407  __pyx_t_7 = 0;
27408  __Pyx_INCREF(__pyx_t_3);
27409  __Pyx_XDECREF_SET(__pyx_v_idx, __pyx_t_3);
27410  __pyx_t_7 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 675, __pyx_L1_error)
27411  __Pyx_GOTREF(__pyx_t_7);
27412  __Pyx_DECREF(__pyx_t_3);
27413  __pyx_t_3 = __pyx_t_7;
27414  __pyx_t_7 = 0;
27415 
27416  /* "View.MemoryView":676
27417  * seen_ellipsis = False
27418  * for idx, item in enumerate(tup):
27419  * if item is Ellipsis: # <<<<<<<<<<<<<<
27420  * if not seen_ellipsis:
27421  * result.extend([slice(None)] * (ndim - len(tup) + 1))
27422  */
27423  __pyx_t_2 = (__pyx_v_item == __pyx_builtin_Ellipsis);
27424  __pyx_t_1 = (__pyx_t_2 != 0);
27425  if (__pyx_t_1) {
27426 
27427  /* "View.MemoryView":677
27428  * for idx, item in enumerate(tup):
27429  * if item is Ellipsis:
27430  * if not seen_ellipsis: # <<<<<<<<<<<<<<
27431  * result.extend([slice(None)] * (ndim - len(tup) + 1))
27432  * seen_ellipsis = True
27433  */
27434  __pyx_t_1 = ((!(__pyx_v_seen_ellipsis != 0)) != 0);
27435  if (__pyx_t_1) {
27436 
27437  /* "View.MemoryView":678
27438  * if item is Ellipsis:
27439  * if not seen_ellipsis:
27440  * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
27441  * seen_ellipsis = True
27442  * else:
27443  */
27444  __pyx_t_8 = PyObject_Length(__pyx_v_tup); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 678, __pyx_L1_error)
27445  __pyx_t_7 = PyList_New(1 * ((((__pyx_v_ndim - __pyx_t_8) + 1)<0) ? 0:((__pyx_v_ndim - __pyx_t_8) + 1))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 678, __pyx_L1_error)
27446  __Pyx_GOTREF(__pyx_t_7);
27447  { Py_ssize_t __pyx_temp;
27448  for (__pyx_temp=0; __pyx_temp < ((__pyx_v_ndim - __pyx_t_8) + 1); __pyx_temp++) {
27449  __Pyx_INCREF(__pyx_slice__27);
27450  __Pyx_GIVEREF(__pyx_slice__27);
27451  PyList_SET_ITEM(__pyx_t_7, __pyx_temp, __pyx_slice__27);
27452  }
27453  }
27454  __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_7); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 678, __pyx_L1_error)
27455  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
27456 
27457  /* "View.MemoryView":679
27458  * if not seen_ellipsis:
27459  * result.extend([slice(None)] * (ndim - len(tup) + 1))
27460  * seen_ellipsis = True # <<<<<<<<<<<<<<
27461  * else:
27462  * result.append(slice(None))
27463  */
27464  __pyx_v_seen_ellipsis = 1;
27465 
27466  /* "View.MemoryView":677
27467  * for idx, item in enumerate(tup):
27468  * if item is Ellipsis:
27469  * if not seen_ellipsis: # <<<<<<<<<<<<<<
27470  * result.extend([slice(None)] * (ndim - len(tup) + 1))
27471  * seen_ellipsis = True
27472  */
27473  goto __pyx_L7;
27474  }
27475 
27476  /* "View.MemoryView":681
27477  * seen_ellipsis = True
27478  * else:
27479  * result.append(slice(None)) # <<<<<<<<<<<<<<
27480  * have_slices = True
27481  * else:
27482  */
27483  /*else*/ {
27484  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_slice__27); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 681, __pyx_L1_error)
27485  }
27486  __pyx_L7:;
27487 
27488  /* "View.MemoryView":682
27489  * else:
27490  * result.append(slice(None))
27491  * have_slices = True # <<<<<<<<<<<<<<
27492  * else:
27493  * if not isinstance(item, slice) and not PyIndex_Check(item):
27494  */
27495  __pyx_v_have_slices = 1;
27496 
27497  /* "View.MemoryView":676
27498  * seen_ellipsis = False
27499  * for idx, item in enumerate(tup):
27500  * if item is Ellipsis: # <<<<<<<<<<<<<<
27501  * if not seen_ellipsis:
27502  * result.extend([slice(None)] * (ndim - len(tup) + 1))
27503  */
27504  goto __pyx_L6;
27505  }
27506 
27507  /* "View.MemoryView":684
27508  * have_slices = True
27509  * else:
27510  * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
27511  * raise TypeError("Cannot index with type '%s'" % type(item))
27512  *
27513  */
27514  /*else*/ {
27515  __pyx_t_2 = PySlice_Check(__pyx_v_item);
27516  __pyx_t_10 = ((!(__pyx_t_2 != 0)) != 0);
27517  if (__pyx_t_10) {
27518  } else {
27519  __pyx_t_1 = __pyx_t_10;
27520  goto __pyx_L9_bool_binop_done;
27521  }
27522  __pyx_t_10 = ((!(PyIndex_Check(__pyx_v_item) != 0)) != 0);
27523  __pyx_t_1 = __pyx_t_10;
27524  __pyx_L9_bool_binop_done:;
27525  if (unlikely(__pyx_t_1)) {
27526 
27527  /* "View.MemoryView":685
27528  * else:
27529  * if not isinstance(item, slice) and not PyIndex_Check(item):
27530  * raise TypeError("Cannot index with type '%s'" % type(item)) # <<<<<<<<<<<<<<
27531  *
27532  * have_slices = have_slices or isinstance(item, slice)
27533  */
27534  __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Cannot_index_with_type_s, ((PyObject *)Py_TYPE(__pyx_v_item))); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 685, __pyx_L1_error)
27535  __Pyx_GOTREF(__pyx_t_7);
27536  __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 685, __pyx_L1_error)
27537  __Pyx_GOTREF(__pyx_t_11);
27538  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
27539  __Pyx_Raise(__pyx_t_11, 0, 0, 0);
27540  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
27541  __PYX_ERR(0, 685, __pyx_L1_error)
27542 
27543  /* "View.MemoryView":684
27544  * have_slices = True
27545  * else:
27546  * if not isinstance(item, slice) and not PyIndex_Check(item): # <<<<<<<<<<<<<<
27547  * raise TypeError("Cannot index with type '%s'" % type(item))
27548  *
27549  */
27550  }
27551 
27552  /* "View.MemoryView":687
27553  * raise TypeError("Cannot index with type '%s'" % type(item))
27554  *
27555  * have_slices = have_slices or isinstance(item, slice) # <<<<<<<<<<<<<<
27556  * result.append(item)
27557  *
27558  */
27559  __pyx_t_10 = (__pyx_v_have_slices != 0);
27560  if (!__pyx_t_10) {
27561  } else {
27562  __pyx_t_1 = __pyx_t_10;
27563  goto __pyx_L11_bool_binop_done;
27564  }
27565  __pyx_t_10 = PySlice_Check(__pyx_v_item);
27566  __pyx_t_2 = (__pyx_t_10 != 0);
27567  __pyx_t_1 = __pyx_t_2;
27568  __pyx_L11_bool_binop_done:;
27569  __pyx_v_have_slices = __pyx_t_1;
27570 
27571  /* "View.MemoryView":688
27572  *
27573  * have_slices = have_slices or isinstance(item, slice)
27574  * result.append(item) # <<<<<<<<<<<<<<
27575  *
27576  * nslices = ndim - len(result)
27577  */
27578  __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_result, __pyx_v_item); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 688, __pyx_L1_error)
27579  }
27580  __pyx_L6:;
27581 
27582  /* "View.MemoryView":675
27583  * have_slices = False
27584  * seen_ellipsis = False
27585  * for idx, item in enumerate(tup): # <<<<<<<<<<<<<<
27586  * if item is Ellipsis:
27587  * if not seen_ellipsis:
27588  */
27589  }
27590  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
27591  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27592 
27593  /* "View.MemoryView":690
27594  * result.append(item)
27595  *
27596  * nslices = ndim - len(result) # <<<<<<<<<<<<<<
27597  * if nslices:
27598  * result.extend([slice(None)] * nslices)
27599  */
27600  __pyx_t_5 = PyList_GET_SIZE(__pyx_v_result); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 690, __pyx_L1_error)
27601  __pyx_v_nslices = (__pyx_v_ndim - __pyx_t_5);
27602 
27603  /* "View.MemoryView":691
27604  *
27605  * nslices = ndim - len(result)
27606  * if nslices: # <<<<<<<<<<<<<<
27607  * result.extend([slice(None)] * nslices)
27608  *
27609  */
27610  __pyx_t_1 = (__pyx_v_nslices != 0);
27611  if (__pyx_t_1) {
27612 
27613  /* "View.MemoryView":692
27614  * nslices = ndim - len(result)
27615  * if nslices:
27616  * result.extend([slice(None)] * nslices) # <<<<<<<<<<<<<<
27617  *
27618  * return have_slices or nslices, tuple(result)
27619  */
27620  __pyx_t_3 = PyList_New(1 * ((__pyx_v_nslices<0) ? 0:__pyx_v_nslices)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error)
27621  __Pyx_GOTREF(__pyx_t_3);
27622  { Py_ssize_t __pyx_temp;
27623  for (__pyx_temp=0; __pyx_temp < __pyx_v_nslices; __pyx_temp++) {
27624  __Pyx_INCREF(__pyx_slice__27);
27625  __Pyx_GIVEREF(__pyx_slice__27);
27626  PyList_SET_ITEM(__pyx_t_3, __pyx_temp, __pyx_slice__27);
27627  }
27628  }
27629  __pyx_t_9 = __Pyx_PyList_Extend(__pyx_v_result, __pyx_t_3); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 692, __pyx_L1_error)
27630  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
27631 
27632  /* "View.MemoryView":691
27633  *
27634  * nslices = ndim - len(result)
27635  * if nslices: # <<<<<<<<<<<<<<
27636  * result.extend([slice(None)] * nslices)
27637  *
27638  */
27639  }
27640 
27641  /* "View.MemoryView":694
27642  * result.extend([slice(None)] * nslices)
27643  *
27644  * return have_slices or nslices, tuple(result) # <<<<<<<<<<<<<<
27645  *
27646  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
27647  */
27648  __Pyx_XDECREF(__pyx_r);
27649  if (!__pyx_v_have_slices) {
27650  } else {
27651  __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_have_slices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
27652  __Pyx_GOTREF(__pyx_t_4);
27653  __pyx_t_3 = __pyx_t_4;
27654  __pyx_t_4 = 0;
27655  goto __pyx_L14_bool_binop_done;
27656  }
27657  __pyx_t_4 = PyInt_FromSsize_t(__pyx_v_nslices); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
27658  __Pyx_GOTREF(__pyx_t_4);
27659  __pyx_t_3 = __pyx_t_4;
27660  __pyx_t_4 = 0;
27661  __pyx_L14_bool_binop_done:;
27662  __pyx_t_4 = PyList_AsTuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error)
27663  __Pyx_GOTREF(__pyx_t_4);
27664  __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 694, __pyx_L1_error)
27665  __Pyx_GOTREF(__pyx_t_11);
27666  __Pyx_GIVEREF(__pyx_t_3);
27667  PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
27668  __Pyx_GIVEREF(__pyx_t_4);
27669  PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_4);
27670  __pyx_t_3 = 0;
27671  __pyx_t_4 = 0;
27672  __pyx_r = ((PyObject*)__pyx_t_11);
27673  __pyx_t_11 = 0;
27674  goto __pyx_L0;
27675 
27676  /* "View.MemoryView":662
27677  * return isinstance(o, memoryview)
27678  *
27679  * cdef tuple _unellipsify(object index, int ndim): # <<<<<<<<<<<<<<
27680  * """
27681  * Replace all ellipses with full slices and fill incomplete indices with
27682  */
27683 
27684  /* function exit code */
27685  __pyx_L1_error:;
27686  __Pyx_XDECREF(__pyx_t_3);
27687  __Pyx_XDECREF(__pyx_t_4);
27688  __Pyx_XDECREF(__pyx_t_7);
27689  __Pyx_XDECREF(__pyx_t_11);
27690  __Pyx_AddTraceback("View.MemoryView._unellipsify", __pyx_clineno, __pyx_lineno, __pyx_filename);
27691  __pyx_r = 0;
27692  __pyx_L0:;
27693  __Pyx_XDECREF(__pyx_v_tup);
27694  __Pyx_XDECREF(__pyx_v_result);
27695  __Pyx_XDECREF(__pyx_v_idx);
27696  __Pyx_XDECREF(__pyx_v_item);
27697  __Pyx_XGIVEREF(__pyx_r);
27698  __Pyx_RefNannyFinishContext();
27699  return __pyx_r;
27700 }
27701 
27702 /* "View.MemoryView":696
27703  * return have_slices or nslices, tuple(result)
27704  *
27705  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
27706  * for suboffset in suboffsets[:ndim]:
27707  * if suboffset >= 0:
27708  */
27709 
27710 static PyObject *assert_direct_dimensions(Py_ssize_t *__pyx_v_suboffsets, int __pyx_v_ndim) {
27711  Py_ssize_t __pyx_v_suboffset;
27712  PyObject *__pyx_r = NULL;
27713  __Pyx_RefNannyDeclarations
27714  Py_ssize_t *__pyx_t_1;
27715  Py_ssize_t *__pyx_t_2;
27716  Py_ssize_t *__pyx_t_3;
27717  int __pyx_t_4;
27718  PyObject *__pyx_t_5 = NULL;
27719  __Pyx_RefNannySetupContext("assert_direct_dimensions", 0);
27720 
27721  /* "View.MemoryView":697
27722  *
27723  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
27724  * for suboffset in suboffsets[:ndim]: # <<<<<<<<<<<<<<
27725  * if suboffset >= 0:
27726  * raise ValueError("Indirect dimensions not supported")
27727  */
27728  __pyx_t_2 = (__pyx_v_suboffsets + __pyx_v_ndim);
27729  for (__pyx_t_3 = __pyx_v_suboffsets; __pyx_t_3 < __pyx_t_2; __pyx_t_3++) {
27730  __pyx_t_1 = __pyx_t_3;
27731  __pyx_v_suboffset = (__pyx_t_1[0]);
27732 
27733  /* "View.MemoryView":698
27734  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
27735  * for suboffset in suboffsets[:ndim]:
27736  * if suboffset >= 0: # <<<<<<<<<<<<<<
27737  * raise ValueError("Indirect dimensions not supported")
27738  *
27739  */
27740  __pyx_t_4 = ((__pyx_v_suboffset >= 0) != 0);
27741  if (unlikely(__pyx_t_4)) {
27742 
27743  /* "View.MemoryView":699
27744  * for suboffset in suboffsets[:ndim]:
27745  * if suboffset >= 0:
27746  * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
27747  *
27748  *
27749  */
27750  __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 699, __pyx_L1_error)
27751  __Pyx_GOTREF(__pyx_t_5);
27752  __Pyx_Raise(__pyx_t_5, 0, 0, 0);
27753  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
27754  __PYX_ERR(0, 699, __pyx_L1_error)
27755 
27756  /* "View.MemoryView":698
27757  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim):
27758  * for suboffset in suboffsets[:ndim]:
27759  * if suboffset >= 0: # <<<<<<<<<<<<<<
27760  * raise ValueError("Indirect dimensions not supported")
27761  *
27762  */
27763  }
27764  }
27765 
27766  /* "View.MemoryView":696
27767  * return have_slices or nslices, tuple(result)
27768  *
27769  * cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): # <<<<<<<<<<<<<<
27770  * for suboffset in suboffsets[:ndim]:
27771  * if suboffset >= 0:
27772  */
27773 
27774  /* function exit code */
27775  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
27776  goto __pyx_L0;
27777  __pyx_L1_error:;
27778  __Pyx_XDECREF(__pyx_t_5);
27779  __Pyx_AddTraceback("View.MemoryView.assert_direct_dimensions", __pyx_clineno, __pyx_lineno, __pyx_filename);
27780  __pyx_r = 0;
27781  __pyx_L0:;
27782  __Pyx_XGIVEREF(__pyx_r);
27783  __Pyx_RefNannyFinishContext();
27784  return __pyx_r;
27785 }
27786 
27787 /* "View.MemoryView":706
27788  *
27789  * @cname('__pyx_memview_slice')
27790  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
27791  * cdef int new_ndim = 0, suboffset_dim = -1, dim
27792  * cdef bint negative_step
27793  */
27794 
27795 static struct __pyx_memoryview_obj *__pyx_memview_slice(struct __pyx_memoryview_obj *__pyx_v_memview, PyObject *__pyx_v_indices) {
27796  int __pyx_v_new_ndim;
27797  int __pyx_v_suboffset_dim;
27798  int __pyx_v_dim;
27799  __Pyx_memviewslice __pyx_v_src;
27800  __Pyx_memviewslice __pyx_v_dst;
27801  __Pyx_memviewslice *__pyx_v_p_src;
27802  struct __pyx_memoryviewslice_obj *__pyx_v_memviewsliceobj = 0;
27803  __Pyx_memviewslice *__pyx_v_p_dst;
27804  int *__pyx_v_p_suboffset_dim;
27805  Py_ssize_t __pyx_v_start;
27806  Py_ssize_t __pyx_v_stop;
27807  Py_ssize_t __pyx_v_step;
27808  int __pyx_v_have_start;
27809  int __pyx_v_have_stop;
27810  int __pyx_v_have_step;
27811  PyObject *__pyx_v_index = NULL;
27812  struct __pyx_memoryview_obj *__pyx_r = NULL;
27813  __Pyx_RefNannyDeclarations
27814  int __pyx_t_1;
27815  int __pyx_t_2;
27816  PyObject *__pyx_t_3 = NULL;
27817  struct __pyx_memoryview_obj *__pyx_t_4;
27818  char *__pyx_t_5;
27819  int __pyx_t_6;
27820  Py_ssize_t __pyx_t_7;
27821  PyObject *(*__pyx_t_8)(PyObject *);
27822  PyObject *__pyx_t_9 = NULL;
27823  Py_ssize_t __pyx_t_10;
27824  int __pyx_t_11;
27825  Py_ssize_t __pyx_t_12;
27826  __Pyx_RefNannySetupContext("memview_slice", 0);
27827 
27828  /* "View.MemoryView":707
27829  * @cname('__pyx_memview_slice')
27830  * cdef memoryview memview_slice(memoryview memview, object indices):
27831  * cdef int new_ndim = 0, suboffset_dim = -1, dim # <<<<<<<<<<<<<<
27832  * cdef bint negative_step
27833  * cdef __Pyx_memviewslice src, dst
27834  */
27835  __pyx_v_new_ndim = 0;
27836  __pyx_v_suboffset_dim = -1;
27837 
27838  /* "View.MemoryView":714
27839  *
27840  *
27841  * memset(&dst, 0, sizeof(dst)) # <<<<<<<<<<<<<<
27842  *
27843  * cdef _memoryviewslice memviewsliceobj
27844  */
27845  (void)(memset((&__pyx_v_dst), 0, (sizeof(__pyx_v_dst))));
27846 
27847  /* "View.MemoryView":718
27848  * cdef _memoryviewslice memviewsliceobj
27849  *
27850  * assert memview.view.ndim > 0 # <<<<<<<<<<<<<<
27851  *
27852  * if isinstance(memview, _memoryviewslice):
27853  */
27854  #ifndef CYTHON_WITHOUT_ASSERTIONS
27855  if (unlikely(!Py_OptimizeFlag)) {
27856  if (unlikely(!((__pyx_v_memview->view.ndim > 0) != 0))) {
27857  PyErr_SetNone(PyExc_AssertionError);
27858  __PYX_ERR(0, 718, __pyx_L1_error)
27859  }
27860  }
27861  #endif
27862 
27863  /* "View.MemoryView":720
27864  * assert memview.view.ndim > 0
27865  *
27866  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
27867  * memviewsliceobj = memview
27868  * p_src = &memviewsliceobj.from_slice
27869  */
27870  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
27871  __pyx_t_2 = (__pyx_t_1 != 0);
27872  if (__pyx_t_2) {
27873 
27874  /* "View.MemoryView":721
27875  *
27876  * if isinstance(memview, _memoryviewslice):
27877  * memviewsliceobj = memview # <<<<<<<<<<<<<<
27878  * p_src = &memviewsliceobj.from_slice
27879  * else:
27880  */
27881  if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(0, 721, __pyx_L1_error)
27882  __pyx_t_3 = ((PyObject *)__pyx_v_memview);
27883  __Pyx_INCREF(__pyx_t_3);
27884  __pyx_v_memviewsliceobj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
27885  __pyx_t_3 = 0;
27886 
27887  /* "View.MemoryView":722
27888  * if isinstance(memview, _memoryviewslice):
27889  * memviewsliceobj = memview
27890  * p_src = &memviewsliceobj.from_slice # <<<<<<<<<<<<<<
27891  * else:
27892  * slice_copy(memview, &src)
27893  */
27894  __pyx_v_p_src = (&__pyx_v_memviewsliceobj->from_slice);
27895 
27896  /* "View.MemoryView":720
27897  * assert memview.view.ndim > 0
27898  *
27899  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
27900  * memviewsliceobj = memview
27901  * p_src = &memviewsliceobj.from_slice
27902  */
27903  goto __pyx_L3;
27904  }
27905 
27906  /* "View.MemoryView":724
27907  * p_src = &memviewsliceobj.from_slice
27908  * else:
27909  * slice_copy(memview, &src) # <<<<<<<<<<<<<<
27910  * p_src = &src
27911  *
27912  */
27913  /*else*/ {
27914  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_src));
27915 
27916  /* "View.MemoryView":725
27917  * else:
27918  * slice_copy(memview, &src)
27919  * p_src = &src # <<<<<<<<<<<<<<
27920  *
27921  *
27922  */
27923  __pyx_v_p_src = (&__pyx_v_src);
27924  }
27925  __pyx_L3:;
27926 
27927  /* "View.MemoryView":731
27928  *
27929  *
27930  * dst.memview = p_src.memview # <<<<<<<<<<<<<<
27931  * dst.data = p_src.data
27932  *
27933  */
27934  __pyx_t_4 = __pyx_v_p_src->memview;
27935  __pyx_v_dst.memview = __pyx_t_4;
27936 
27937  /* "View.MemoryView":732
27938  *
27939  * dst.memview = p_src.memview
27940  * dst.data = p_src.data # <<<<<<<<<<<<<<
27941  *
27942  *
27943  */
27944  __pyx_t_5 = __pyx_v_p_src->data;
27945  __pyx_v_dst.data = __pyx_t_5;
27946 
27947  /* "View.MemoryView":737
27948  *
27949  *
27950  * cdef __Pyx_memviewslice *p_dst = &dst # <<<<<<<<<<<<<<
27951  * cdef int *p_suboffset_dim = &suboffset_dim
27952  * cdef Py_ssize_t start, stop, step
27953  */
27954  __pyx_v_p_dst = (&__pyx_v_dst);
27955 
27956  /* "View.MemoryView":738
27957  *
27958  * cdef __Pyx_memviewslice *p_dst = &dst
27959  * cdef int *p_suboffset_dim = &suboffset_dim # <<<<<<<<<<<<<<
27960  * cdef Py_ssize_t start, stop, step
27961  * cdef bint have_start, have_stop, have_step
27962  */
27963  __pyx_v_p_suboffset_dim = (&__pyx_v_suboffset_dim);
27964 
27965  /* "View.MemoryView":742
27966  * cdef bint have_start, have_stop, have_step
27967  *
27968  * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
27969  * if PyIndex_Check(index):
27970  * slice_memviewslice(
27971  */
27972  __pyx_t_6 = 0;
27973  if (likely(PyList_CheckExact(__pyx_v_indices)) || PyTuple_CheckExact(__pyx_v_indices)) {
27974  __pyx_t_3 = __pyx_v_indices; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0;
27975  __pyx_t_8 = NULL;
27976  } else {
27977  __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_indices); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 742, __pyx_L1_error)
27978  __Pyx_GOTREF(__pyx_t_3);
27979  __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 742, __pyx_L1_error)
27980  }
27981  for (;;) {
27982  if (likely(!__pyx_t_8)) {
27983  if (likely(PyList_CheckExact(__pyx_t_3))) {
27984  if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
27985  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27986  __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 742, __pyx_L1_error)
27987  #else
27988  __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 742, __pyx_L1_error)
27989  __Pyx_GOTREF(__pyx_t_9);
27990  #endif
27991  } else {
27992  if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
27993  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
27994  __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 742, __pyx_L1_error)
27995  #else
27996  __pyx_t_9 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 742, __pyx_L1_error)
27997  __Pyx_GOTREF(__pyx_t_9);
27998  #endif
27999  }
28000  } else {
28001  __pyx_t_9 = __pyx_t_8(__pyx_t_3);
28002  if (unlikely(!__pyx_t_9)) {
28003  PyObject* exc_type = PyErr_Occurred();
28004  if (exc_type) {
28005  if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
28006  else __PYX_ERR(0, 742, __pyx_L1_error)
28007  }
28008  break;
28009  }
28010  __Pyx_GOTREF(__pyx_t_9);
28011  }
28012  __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9);
28013  __pyx_t_9 = 0;
28014  __pyx_v_dim = __pyx_t_6;
28015  __pyx_t_6 = (__pyx_t_6 + 1);
28016 
28017  /* "View.MemoryView":743
28018  *
28019  * for dim, index in enumerate(indices):
28020  * if PyIndex_Check(index): # <<<<<<<<<<<<<<
28021  * slice_memviewslice(
28022  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
28023  */
28024  __pyx_t_2 = (PyIndex_Check(__pyx_v_index) != 0);
28025  if (__pyx_t_2) {
28026 
28027  /* "View.MemoryView":747
28028  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
28029  * dim, new_ndim, p_suboffset_dim,
28030  * index, 0, 0, # start, stop, step # <<<<<<<<<<<<<<
28031  * 0, 0, 0, # have_{start,stop,step}
28032  * False)
28033  */
28034  __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_v_index); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 747, __pyx_L1_error)
28035 
28036  /* "View.MemoryView":744
28037  * for dim, index in enumerate(indices):
28038  * if PyIndex_Check(index):
28039  * slice_memviewslice( # <<<<<<<<<<<<<<
28040  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
28041  * dim, new_ndim, p_suboffset_dim,
28042  */
28043  __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_t_10, 0, 0, 0, 0, 0, 0); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 744, __pyx_L1_error)
28044 
28045  /* "View.MemoryView":743
28046  *
28047  * for dim, index in enumerate(indices):
28048  * if PyIndex_Check(index): # <<<<<<<<<<<<<<
28049  * slice_memviewslice(
28050  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
28051  */
28052  goto __pyx_L6;
28053  }
28054 
28055  /* "View.MemoryView":750
28056  * 0, 0, 0, # have_{start,stop,step}
28057  * False)
28058  * elif index is None: # <<<<<<<<<<<<<<
28059  * p_dst.shape[new_ndim] = 1
28060  * p_dst.strides[new_ndim] = 0
28061  */
28062  __pyx_t_2 = (__pyx_v_index == Py_None);
28063  __pyx_t_1 = (__pyx_t_2 != 0);
28064  if (__pyx_t_1) {
28065 
28066  /* "View.MemoryView":751
28067  * False)
28068  * elif index is None:
28069  * p_dst.shape[new_ndim] = 1 # <<<<<<<<<<<<<<
28070  * p_dst.strides[new_ndim] = 0
28071  * p_dst.suboffsets[new_ndim] = -1
28072  */
28073  (__pyx_v_p_dst->shape[__pyx_v_new_ndim]) = 1;
28074 
28075  /* "View.MemoryView":752
28076  * elif index is None:
28077  * p_dst.shape[new_ndim] = 1
28078  * p_dst.strides[new_ndim] = 0 # <<<<<<<<<<<<<<
28079  * p_dst.suboffsets[new_ndim] = -1
28080  * new_ndim += 1
28081  */
28082  (__pyx_v_p_dst->strides[__pyx_v_new_ndim]) = 0;
28083 
28084  /* "View.MemoryView":753
28085  * p_dst.shape[new_ndim] = 1
28086  * p_dst.strides[new_ndim] = 0
28087  * p_dst.suboffsets[new_ndim] = -1 # <<<<<<<<<<<<<<
28088  * new_ndim += 1
28089  * else:
28090  */
28091  (__pyx_v_p_dst->suboffsets[__pyx_v_new_ndim]) = -1L;
28092 
28093  /* "View.MemoryView":754
28094  * p_dst.strides[new_ndim] = 0
28095  * p_dst.suboffsets[new_ndim] = -1
28096  * new_ndim += 1 # <<<<<<<<<<<<<<
28097  * else:
28098  * start = index.start or 0
28099  */
28100  __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
28101 
28102  /* "View.MemoryView":750
28103  * 0, 0, 0, # have_{start,stop,step}
28104  * False)
28105  * elif index is None: # <<<<<<<<<<<<<<
28106  * p_dst.shape[new_ndim] = 1
28107  * p_dst.strides[new_ndim] = 0
28108  */
28109  goto __pyx_L6;
28110  }
28111 
28112  /* "View.MemoryView":756
28113  * new_ndim += 1
28114  * else:
28115  * start = index.start or 0 # <<<<<<<<<<<<<<
28116  * stop = index.stop or 0
28117  * step = index.step or 0
28118  */
28119  /*else*/ {
28120  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 756, __pyx_L1_error)
28121  __Pyx_GOTREF(__pyx_t_9);
28122  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 756, __pyx_L1_error)
28123  if (!__pyx_t_1) {
28124  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28125  } else {
28126  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 756, __pyx_L1_error)
28127  __pyx_t_10 = __pyx_t_12;
28128  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28129  goto __pyx_L7_bool_binop_done;
28130  }
28131  __pyx_t_10 = 0;
28132  __pyx_L7_bool_binop_done:;
28133  __pyx_v_start = __pyx_t_10;
28134 
28135  /* "View.MemoryView":757
28136  * else:
28137  * start = index.start or 0
28138  * stop = index.stop or 0 # <<<<<<<<<<<<<<
28139  * step = index.step or 0
28140  *
28141  */
28142  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 757, __pyx_L1_error)
28143  __Pyx_GOTREF(__pyx_t_9);
28144  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 757, __pyx_L1_error)
28145  if (!__pyx_t_1) {
28146  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28147  } else {
28148  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 757, __pyx_L1_error)
28149  __pyx_t_10 = __pyx_t_12;
28150  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28151  goto __pyx_L9_bool_binop_done;
28152  }
28153  __pyx_t_10 = 0;
28154  __pyx_L9_bool_binop_done:;
28155  __pyx_v_stop = __pyx_t_10;
28156 
28157  /* "View.MemoryView":758
28158  * start = index.start or 0
28159  * stop = index.stop or 0
28160  * step = index.step or 0 # <<<<<<<<<<<<<<
28161  *
28162  * have_start = index.start is not None
28163  */
28164  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 758, __pyx_L1_error)
28165  __Pyx_GOTREF(__pyx_t_9);
28166  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 758, __pyx_L1_error)
28167  if (!__pyx_t_1) {
28168  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28169  } else {
28170  __pyx_t_12 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_12 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 758, __pyx_L1_error)
28171  __pyx_t_10 = __pyx_t_12;
28172  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28173  goto __pyx_L11_bool_binop_done;
28174  }
28175  __pyx_t_10 = 0;
28176  __pyx_L11_bool_binop_done:;
28177  __pyx_v_step = __pyx_t_10;
28178 
28179  /* "View.MemoryView":760
28180  * step = index.step or 0
28181  *
28182  * have_start = index.start is not None # <<<<<<<<<<<<<<
28183  * have_stop = index.stop is not None
28184  * have_step = index.step is not None
28185  */
28186  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 760, __pyx_L1_error)
28187  __Pyx_GOTREF(__pyx_t_9);
28188  __pyx_t_1 = (__pyx_t_9 != Py_None);
28189  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28190  __pyx_v_have_start = __pyx_t_1;
28191 
28192  /* "View.MemoryView":761
28193  *
28194  * have_start = index.start is not None
28195  * have_stop = index.stop is not None # <<<<<<<<<<<<<<
28196  * have_step = index.step is not None
28197  *
28198  */
28199  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_stop); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 761, __pyx_L1_error)
28200  __Pyx_GOTREF(__pyx_t_9);
28201  __pyx_t_1 = (__pyx_t_9 != Py_None);
28202  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28203  __pyx_v_have_stop = __pyx_t_1;
28204 
28205  /* "View.MemoryView":762
28206  * have_start = index.start is not None
28207  * have_stop = index.stop is not None
28208  * have_step = index.step is not None # <<<<<<<<<<<<<<
28209  *
28210  * slice_memviewslice(
28211  */
28212  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_step); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 762, __pyx_L1_error)
28213  __Pyx_GOTREF(__pyx_t_9);
28214  __pyx_t_1 = (__pyx_t_9 != Py_None);
28215  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
28216  __pyx_v_have_step = __pyx_t_1;
28217 
28218  /* "View.MemoryView":764
28219  * have_step = index.step is not None
28220  *
28221  * slice_memviewslice( # <<<<<<<<<<<<<<
28222  * p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim],
28223  * dim, new_ndim, p_suboffset_dim,
28224  */
28225  __pyx_t_11 = __pyx_memoryview_slice_memviewslice(__pyx_v_p_dst, (__pyx_v_p_src->shape[__pyx_v_dim]), (__pyx_v_p_src->strides[__pyx_v_dim]), (__pyx_v_p_src->suboffsets[__pyx_v_dim]), __pyx_v_dim, __pyx_v_new_ndim, __pyx_v_p_suboffset_dim, __pyx_v_start, __pyx_v_stop, __pyx_v_step, __pyx_v_have_start, __pyx_v_have_stop, __pyx_v_have_step, 1); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 764, __pyx_L1_error)
28226 
28227  /* "View.MemoryView":770
28228  * have_start, have_stop, have_step,
28229  * True)
28230  * new_ndim += 1 # <<<<<<<<<<<<<<
28231  *
28232  * if isinstance(memview, _memoryviewslice):
28233  */
28234  __pyx_v_new_ndim = (__pyx_v_new_ndim + 1);
28235  }
28236  __pyx_L6:;
28237 
28238  /* "View.MemoryView":742
28239  * cdef bint have_start, have_stop, have_step
28240  *
28241  * for dim, index in enumerate(indices): # <<<<<<<<<<<<<<
28242  * if PyIndex_Check(index):
28243  * slice_memviewslice(
28244  */
28245  }
28246  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
28247 
28248  /* "View.MemoryView":772
28249  * new_ndim += 1
28250  *
28251  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
28252  * return memoryview_fromslice(dst, new_ndim,
28253  * memviewsliceobj.to_object_func,
28254  */
28255  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
28256  __pyx_t_2 = (__pyx_t_1 != 0);
28257  if (__pyx_t_2) {
28258 
28259  /* "View.MemoryView":773
28260  *
28261  * if isinstance(memview, _memoryviewslice):
28262  * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
28263  * memviewsliceobj.to_object_func,
28264  * memviewsliceobj.to_dtype_func,
28265  */
28266  __Pyx_XDECREF(((PyObject *)__pyx_r));
28267 
28268  /* "View.MemoryView":774
28269  * if isinstance(memview, _memoryviewslice):
28270  * return memoryview_fromslice(dst, new_ndim,
28271  * memviewsliceobj.to_object_func, # <<<<<<<<<<<<<<
28272  * memviewsliceobj.to_dtype_func,
28273  * memview.dtype_is_object)
28274  */
28275  if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(0, 774, __pyx_L1_error) }
28276 
28277  /* "View.MemoryView":775
28278  * return memoryview_fromslice(dst, new_ndim,
28279  * memviewsliceobj.to_object_func,
28280  * memviewsliceobj.to_dtype_func, # <<<<<<<<<<<<<<
28281  * memview.dtype_is_object)
28282  * else:
28283  */
28284  if (unlikely(!__pyx_v_memviewsliceobj)) { __Pyx_RaiseUnboundLocalError("memviewsliceobj"); __PYX_ERR(0, 775, __pyx_L1_error) }
28285 
28286  /* "View.MemoryView":773
28287  *
28288  * if isinstance(memview, _memoryviewslice):
28289  * return memoryview_fromslice(dst, new_ndim, # <<<<<<<<<<<<<<
28290  * memviewsliceobj.to_object_func,
28291  * memviewsliceobj.to_dtype_func,
28292  */
28293  __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, __pyx_v_memviewsliceobj->to_object_func, __pyx_v_memviewsliceobj->to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 773, __pyx_L1_error)
28294  __Pyx_GOTREF(__pyx_t_3);
28295  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(0, 773, __pyx_L1_error)
28296  __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
28297  __pyx_t_3 = 0;
28298  goto __pyx_L0;
28299 
28300  /* "View.MemoryView":772
28301  * new_ndim += 1
28302  *
28303  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
28304  * return memoryview_fromslice(dst, new_ndim,
28305  * memviewsliceobj.to_object_func,
28306  */
28307  }
28308 
28309  /* "View.MemoryView":778
28310  * memview.dtype_is_object)
28311  * else:
28312  * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
28313  * memview.dtype_is_object)
28314  *
28315  */
28316  /*else*/ {
28317  __Pyx_XDECREF(((PyObject *)__pyx_r));
28318 
28319  /* "View.MemoryView":779
28320  * else:
28321  * return memoryview_fromslice(dst, new_ndim, NULL, NULL,
28322  * memview.dtype_is_object) # <<<<<<<<<<<<<<
28323  *
28324  *
28325  */
28326  __pyx_t_3 = __pyx_memoryview_fromslice(__pyx_v_dst, __pyx_v_new_ndim, NULL, NULL, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error)
28327  __Pyx_GOTREF(__pyx_t_3);
28328 
28329  /* "View.MemoryView":778
28330  * memview.dtype_is_object)
28331  * else:
28332  * return memoryview_fromslice(dst, new_ndim, NULL, NULL, # <<<<<<<<<<<<<<
28333  * memview.dtype_is_object)
28334  *
28335  */
28336  if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_memoryview_type))))) __PYX_ERR(0, 778, __pyx_L1_error)
28337  __pyx_r = ((struct __pyx_memoryview_obj *)__pyx_t_3);
28338  __pyx_t_3 = 0;
28339  goto __pyx_L0;
28340  }
28341 
28342  /* "View.MemoryView":706
28343  *
28344  * @cname('__pyx_memview_slice')
28345  * cdef memoryview memview_slice(memoryview memview, object indices): # <<<<<<<<<<<<<<
28346  * cdef int new_ndim = 0, suboffset_dim = -1, dim
28347  * cdef bint negative_step
28348  */
28349 
28350  /* function exit code */
28351  __pyx_L1_error:;
28352  __Pyx_XDECREF(__pyx_t_3);
28353  __Pyx_XDECREF(__pyx_t_9);
28354  __Pyx_AddTraceback("View.MemoryView.memview_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
28355  __pyx_r = 0;
28356  __pyx_L0:;
28357  __Pyx_XDECREF((PyObject *)__pyx_v_memviewsliceobj);
28358  __Pyx_XDECREF(__pyx_v_index);
28359  __Pyx_XGIVEREF((PyObject *)__pyx_r);
28360  __Pyx_RefNannyFinishContext();
28361  return __pyx_r;
28362 }
28363 
28364 /* "View.MemoryView":803
28365  *
28366  * @cname('__pyx_memoryview_slice_memviewslice')
28367  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
28368  * __Pyx_memviewslice *dst,
28369  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
28370  */
28371 
28372 static int __pyx_memoryview_slice_memviewslice(__Pyx_memviewslice *__pyx_v_dst, Py_ssize_t __pyx_v_shape, Py_ssize_t __pyx_v_stride, Py_ssize_t __pyx_v_suboffset, int __pyx_v_dim, int __pyx_v_new_ndim, int *__pyx_v_suboffset_dim, Py_ssize_t __pyx_v_start, Py_ssize_t __pyx_v_stop, Py_ssize_t __pyx_v_step, int __pyx_v_have_start, int __pyx_v_have_stop, int __pyx_v_have_step, int __pyx_v_is_slice) {
28373  Py_ssize_t __pyx_v_new_shape;
28374  int __pyx_v_negative_step;
28375  int __pyx_r;
28376  int __pyx_t_1;
28377  int __pyx_t_2;
28378  int __pyx_t_3;
28379 
28380  /* "View.MemoryView":823
28381  * cdef bint negative_step
28382  *
28383  * if not is_slice: # <<<<<<<<<<<<<<
28384  *
28385  * if start < 0:
28386  */
28387  __pyx_t_1 = ((!(__pyx_v_is_slice != 0)) != 0);
28388  if (__pyx_t_1) {
28389 
28390  /* "View.MemoryView":825
28391  * if not is_slice:
28392  *
28393  * if start < 0: # <<<<<<<<<<<<<<
28394  * start += shape
28395  * if not 0 <= start < shape:
28396  */
28397  __pyx_t_1 = ((__pyx_v_start < 0) != 0);
28398  if (__pyx_t_1) {
28399 
28400  /* "View.MemoryView":826
28401  *
28402  * if start < 0:
28403  * start += shape # <<<<<<<<<<<<<<
28404  * if not 0 <= start < shape:
28405  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
28406  */
28407  __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
28408 
28409  /* "View.MemoryView":825
28410  * if not is_slice:
28411  *
28412  * if start < 0: # <<<<<<<<<<<<<<
28413  * start += shape
28414  * if not 0 <= start < shape:
28415  */
28416  }
28417 
28418  /* "View.MemoryView":827
28419  * if start < 0:
28420  * start += shape
28421  * if not 0 <= start < shape: # <<<<<<<<<<<<<<
28422  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
28423  * else:
28424  */
28425  __pyx_t_1 = (0 <= __pyx_v_start);
28426  if (__pyx_t_1) {
28427  __pyx_t_1 = (__pyx_v_start < __pyx_v_shape);
28428  }
28429  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
28430  if (__pyx_t_2) {
28431 
28432  /* "View.MemoryView":828
28433  * start += shape
28434  * if not 0 <= start < shape:
28435  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim) # <<<<<<<<<<<<<<
28436  * else:
28437  *
28438  */
28439  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"Index out of bounds (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 828, __pyx_L1_error)
28440 
28441  /* "View.MemoryView":827
28442  * if start < 0:
28443  * start += shape
28444  * if not 0 <= start < shape: # <<<<<<<<<<<<<<
28445  * _err_dim(IndexError, "Index out of bounds (axis %d)", dim)
28446  * else:
28447  */
28448  }
28449 
28450  /* "View.MemoryView":823
28451  * cdef bint negative_step
28452  *
28453  * if not is_slice: # <<<<<<<<<<<<<<
28454  *
28455  * if start < 0:
28456  */
28457  goto __pyx_L3;
28458  }
28459 
28460  /* "View.MemoryView":831
28461  * else:
28462  *
28463  * negative_step = have_step != 0 and step < 0 # <<<<<<<<<<<<<<
28464  *
28465  * if have_step and step == 0:
28466  */
28467  /*else*/ {
28468  __pyx_t_1 = ((__pyx_v_have_step != 0) != 0);
28469  if (__pyx_t_1) {
28470  } else {
28471  __pyx_t_2 = __pyx_t_1;
28472  goto __pyx_L6_bool_binop_done;
28473  }
28474  __pyx_t_1 = ((__pyx_v_step < 0) != 0);
28475  __pyx_t_2 = __pyx_t_1;
28476  __pyx_L6_bool_binop_done:;
28477  __pyx_v_negative_step = __pyx_t_2;
28478 
28479  /* "View.MemoryView":833
28480  * negative_step = have_step != 0 and step < 0
28481  *
28482  * if have_step and step == 0: # <<<<<<<<<<<<<<
28483  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
28484  *
28485  */
28486  __pyx_t_1 = (__pyx_v_have_step != 0);
28487  if (__pyx_t_1) {
28488  } else {
28489  __pyx_t_2 = __pyx_t_1;
28490  goto __pyx_L9_bool_binop_done;
28491  }
28492  __pyx_t_1 = ((__pyx_v_step == 0) != 0);
28493  __pyx_t_2 = __pyx_t_1;
28494  __pyx_L9_bool_binop_done:;
28495  if (__pyx_t_2) {
28496 
28497  /* "View.MemoryView":834
28498  *
28499  * if have_step and step == 0:
28500  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim) # <<<<<<<<<<<<<<
28501  *
28502  *
28503  */
28504  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Step may not be zero (axis %d)"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 834, __pyx_L1_error)
28505 
28506  /* "View.MemoryView":833
28507  * negative_step = have_step != 0 and step < 0
28508  *
28509  * if have_step and step == 0: # <<<<<<<<<<<<<<
28510  * _err_dim(ValueError, "Step may not be zero (axis %d)", dim)
28511  *
28512  */
28513  }
28514 
28515  /* "View.MemoryView":837
28516  *
28517  *
28518  * if have_start: # <<<<<<<<<<<<<<
28519  * if start < 0:
28520  * start += shape
28521  */
28522  __pyx_t_2 = (__pyx_v_have_start != 0);
28523  if (__pyx_t_2) {
28524 
28525  /* "View.MemoryView":838
28526  *
28527  * if have_start:
28528  * if start < 0: # <<<<<<<<<<<<<<
28529  * start += shape
28530  * if start < 0:
28531  */
28532  __pyx_t_2 = ((__pyx_v_start < 0) != 0);
28533  if (__pyx_t_2) {
28534 
28535  /* "View.MemoryView":839
28536  * if have_start:
28537  * if start < 0:
28538  * start += shape # <<<<<<<<<<<<<<
28539  * if start < 0:
28540  * start = 0
28541  */
28542  __pyx_v_start = (__pyx_v_start + __pyx_v_shape);
28543 
28544  /* "View.MemoryView":840
28545  * if start < 0:
28546  * start += shape
28547  * if start < 0: # <<<<<<<<<<<<<<
28548  * start = 0
28549  * elif start >= shape:
28550  */
28551  __pyx_t_2 = ((__pyx_v_start < 0) != 0);
28552  if (__pyx_t_2) {
28553 
28554  /* "View.MemoryView":841
28555  * start += shape
28556  * if start < 0:
28557  * start = 0 # <<<<<<<<<<<<<<
28558  * elif start >= shape:
28559  * if negative_step:
28560  */
28561  __pyx_v_start = 0;
28562 
28563  /* "View.MemoryView":840
28564  * if start < 0:
28565  * start += shape
28566  * if start < 0: # <<<<<<<<<<<<<<
28567  * start = 0
28568  * elif start >= shape:
28569  */
28570  }
28571 
28572  /* "View.MemoryView":838
28573  *
28574  * if have_start:
28575  * if start < 0: # <<<<<<<<<<<<<<
28576  * start += shape
28577  * if start < 0:
28578  */
28579  goto __pyx_L12;
28580  }
28581 
28582  /* "View.MemoryView":842
28583  * if start < 0:
28584  * start = 0
28585  * elif start >= shape: # <<<<<<<<<<<<<<
28586  * if negative_step:
28587  * start = shape - 1
28588  */
28589  __pyx_t_2 = ((__pyx_v_start >= __pyx_v_shape) != 0);
28590  if (__pyx_t_2) {
28591 
28592  /* "View.MemoryView":843
28593  * start = 0
28594  * elif start >= shape:
28595  * if negative_step: # <<<<<<<<<<<<<<
28596  * start = shape - 1
28597  * else:
28598  */
28599  __pyx_t_2 = (__pyx_v_negative_step != 0);
28600  if (__pyx_t_2) {
28601 
28602  /* "View.MemoryView":844
28603  * elif start >= shape:
28604  * if negative_step:
28605  * start = shape - 1 # <<<<<<<<<<<<<<
28606  * else:
28607  * start = shape
28608  */
28609  __pyx_v_start = (__pyx_v_shape - 1);
28610 
28611  /* "View.MemoryView":843
28612  * start = 0
28613  * elif start >= shape:
28614  * if negative_step: # <<<<<<<<<<<<<<
28615  * start = shape - 1
28616  * else:
28617  */
28618  goto __pyx_L14;
28619  }
28620 
28621  /* "View.MemoryView":846
28622  * start = shape - 1
28623  * else:
28624  * start = shape # <<<<<<<<<<<<<<
28625  * else:
28626  * if negative_step:
28627  */
28628  /*else*/ {
28629  __pyx_v_start = __pyx_v_shape;
28630  }
28631  __pyx_L14:;
28632 
28633  /* "View.MemoryView":842
28634  * if start < 0:
28635  * start = 0
28636  * elif start >= shape: # <<<<<<<<<<<<<<
28637  * if negative_step:
28638  * start = shape - 1
28639  */
28640  }
28641  __pyx_L12:;
28642 
28643  /* "View.MemoryView":837
28644  *
28645  *
28646  * if have_start: # <<<<<<<<<<<<<<
28647  * if start < 0:
28648  * start += shape
28649  */
28650  goto __pyx_L11;
28651  }
28652 
28653  /* "View.MemoryView":848
28654  * start = shape
28655  * else:
28656  * if negative_step: # <<<<<<<<<<<<<<
28657  * start = shape - 1
28658  * else:
28659  */
28660  /*else*/ {
28661  __pyx_t_2 = (__pyx_v_negative_step != 0);
28662  if (__pyx_t_2) {
28663 
28664  /* "View.MemoryView":849
28665  * else:
28666  * if negative_step:
28667  * start = shape - 1 # <<<<<<<<<<<<<<
28668  * else:
28669  * start = 0
28670  */
28671  __pyx_v_start = (__pyx_v_shape - 1);
28672 
28673  /* "View.MemoryView":848
28674  * start = shape
28675  * else:
28676  * if negative_step: # <<<<<<<<<<<<<<
28677  * start = shape - 1
28678  * else:
28679  */
28680  goto __pyx_L15;
28681  }
28682 
28683  /* "View.MemoryView":851
28684  * start = shape - 1
28685  * else:
28686  * start = 0 # <<<<<<<<<<<<<<
28687  *
28688  * if have_stop:
28689  */
28690  /*else*/ {
28691  __pyx_v_start = 0;
28692  }
28693  __pyx_L15:;
28694  }
28695  __pyx_L11:;
28696 
28697  /* "View.MemoryView":853
28698  * start = 0
28699  *
28700  * if have_stop: # <<<<<<<<<<<<<<
28701  * if stop < 0:
28702  * stop += shape
28703  */
28704  __pyx_t_2 = (__pyx_v_have_stop != 0);
28705  if (__pyx_t_2) {
28706 
28707  /* "View.MemoryView":854
28708  *
28709  * if have_stop:
28710  * if stop < 0: # <<<<<<<<<<<<<<
28711  * stop += shape
28712  * if stop < 0:
28713  */
28714  __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
28715  if (__pyx_t_2) {
28716 
28717  /* "View.MemoryView":855
28718  * if have_stop:
28719  * if stop < 0:
28720  * stop += shape # <<<<<<<<<<<<<<
28721  * if stop < 0:
28722  * stop = 0
28723  */
28724  __pyx_v_stop = (__pyx_v_stop + __pyx_v_shape);
28725 
28726  /* "View.MemoryView":856
28727  * if stop < 0:
28728  * stop += shape
28729  * if stop < 0: # <<<<<<<<<<<<<<
28730  * stop = 0
28731  * elif stop > shape:
28732  */
28733  __pyx_t_2 = ((__pyx_v_stop < 0) != 0);
28734  if (__pyx_t_2) {
28735 
28736  /* "View.MemoryView":857
28737  * stop += shape
28738  * if stop < 0:
28739  * stop = 0 # <<<<<<<<<<<<<<
28740  * elif stop > shape:
28741  * stop = shape
28742  */
28743  __pyx_v_stop = 0;
28744 
28745  /* "View.MemoryView":856
28746  * if stop < 0:
28747  * stop += shape
28748  * if stop < 0: # <<<<<<<<<<<<<<
28749  * stop = 0
28750  * elif stop > shape:
28751  */
28752  }
28753 
28754  /* "View.MemoryView":854
28755  *
28756  * if have_stop:
28757  * if stop < 0: # <<<<<<<<<<<<<<
28758  * stop += shape
28759  * if stop < 0:
28760  */
28761  goto __pyx_L17;
28762  }
28763 
28764  /* "View.MemoryView":858
28765  * if stop < 0:
28766  * stop = 0
28767  * elif stop > shape: # <<<<<<<<<<<<<<
28768  * stop = shape
28769  * else:
28770  */
28771  __pyx_t_2 = ((__pyx_v_stop > __pyx_v_shape) != 0);
28772  if (__pyx_t_2) {
28773 
28774  /* "View.MemoryView":859
28775  * stop = 0
28776  * elif stop > shape:
28777  * stop = shape # <<<<<<<<<<<<<<
28778  * else:
28779  * if negative_step:
28780  */
28781  __pyx_v_stop = __pyx_v_shape;
28782 
28783  /* "View.MemoryView":858
28784  * if stop < 0:
28785  * stop = 0
28786  * elif stop > shape: # <<<<<<<<<<<<<<
28787  * stop = shape
28788  * else:
28789  */
28790  }
28791  __pyx_L17:;
28792 
28793  /* "View.MemoryView":853
28794  * start = 0
28795  *
28796  * if have_stop: # <<<<<<<<<<<<<<
28797  * if stop < 0:
28798  * stop += shape
28799  */
28800  goto __pyx_L16;
28801  }
28802 
28803  /* "View.MemoryView":861
28804  * stop = shape
28805  * else:
28806  * if negative_step: # <<<<<<<<<<<<<<
28807  * stop = -1
28808  * else:
28809  */
28810  /*else*/ {
28811  __pyx_t_2 = (__pyx_v_negative_step != 0);
28812  if (__pyx_t_2) {
28813 
28814  /* "View.MemoryView":862
28815  * else:
28816  * if negative_step:
28817  * stop = -1 # <<<<<<<<<<<<<<
28818  * else:
28819  * stop = shape
28820  */
28821  __pyx_v_stop = -1L;
28822 
28823  /* "View.MemoryView":861
28824  * stop = shape
28825  * else:
28826  * if negative_step: # <<<<<<<<<<<<<<
28827  * stop = -1
28828  * else:
28829  */
28830  goto __pyx_L19;
28831  }
28832 
28833  /* "View.MemoryView":864
28834  * stop = -1
28835  * else:
28836  * stop = shape # <<<<<<<<<<<<<<
28837  *
28838  * if not have_step:
28839  */
28840  /*else*/ {
28841  __pyx_v_stop = __pyx_v_shape;
28842  }
28843  __pyx_L19:;
28844  }
28845  __pyx_L16:;
28846 
28847  /* "View.MemoryView":866
28848  * stop = shape
28849  *
28850  * if not have_step: # <<<<<<<<<<<<<<
28851  * step = 1
28852  *
28853  */
28854  __pyx_t_2 = ((!(__pyx_v_have_step != 0)) != 0);
28855  if (__pyx_t_2) {
28856 
28857  /* "View.MemoryView":867
28858  *
28859  * if not have_step:
28860  * step = 1 # <<<<<<<<<<<<<<
28861  *
28862  *
28863  */
28864  __pyx_v_step = 1;
28865 
28866  /* "View.MemoryView":866
28867  * stop = shape
28868  *
28869  * if not have_step: # <<<<<<<<<<<<<<
28870  * step = 1
28871  *
28872  */
28873  }
28874 
28875  /* "View.MemoryView":871
28876  *
28877  * with cython.cdivision(True):
28878  * new_shape = (stop - start) // step # <<<<<<<<<<<<<<
28879  *
28880  * if (stop - start) - step * new_shape:
28881  */
28882  __pyx_v_new_shape = ((__pyx_v_stop - __pyx_v_start) / __pyx_v_step);
28883 
28884  /* "View.MemoryView":873
28885  * new_shape = (stop - start) // step
28886  *
28887  * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
28888  * new_shape += 1
28889  *
28890  */
28891  __pyx_t_2 = (((__pyx_v_stop - __pyx_v_start) - (__pyx_v_step * __pyx_v_new_shape)) != 0);
28892  if (__pyx_t_2) {
28893 
28894  /* "View.MemoryView":874
28895  *
28896  * if (stop - start) - step * new_shape:
28897  * new_shape += 1 # <<<<<<<<<<<<<<
28898  *
28899  * if new_shape < 0:
28900  */
28901  __pyx_v_new_shape = (__pyx_v_new_shape + 1);
28902 
28903  /* "View.MemoryView":873
28904  * new_shape = (stop - start) // step
28905  *
28906  * if (stop - start) - step * new_shape: # <<<<<<<<<<<<<<
28907  * new_shape += 1
28908  *
28909  */
28910  }
28911 
28912  /* "View.MemoryView":876
28913  * new_shape += 1
28914  *
28915  * if new_shape < 0: # <<<<<<<<<<<<<<
28916  * new_shape = 0
28917  *
28918  */
28919  __pyx_t_2 = ((__pyx_v_new_shape < 0) != 0);
28920  if (__pyx_t_2) {
28921 
28922  /* "View.MemoryView":877
28923  *
28924  * if new_shape < 0:
28925  * new_shape = 0 # <<<<<<<<<<<<<<
28926  *
28927  *
28928  */
28929  __pyx_v_new_shape = 0;
28930 
28931  /* "View.MemoryView":876
28932  * new_shape += 1
28933  *
28934  * if new_shape < 0: # <<<<<<<<<<<<<<
28935  * new_shape = 0
28936  *
28937  */
28938  }
28939 
28940  /* "View.MemoryView":880
28941  *
28942  *
28943  * dst.strides[new_ndim] = stride * step # <<<<<<<<<<<<<<
28944  * dst.shape[new_ndim] = new_shape
28945  * dst.suboffsets[new_ndim] = suboffset
28946  */
28947  (__pyx_v_dst->strides[__pyx_v_new_ndim]) = (__pyx_v_stride * __pyx_v_step);
28948 
28949  /* "View.MemoryView":881
28950  *
28951  * dst.strides[new_ndim] = stride * step
28952  * dst.shape[new_ndim] = new_shape # <<<<<<<<<<<<<<
28953  * dst.suboffsets[new_ndim] = suboffset
28954  *
28955  */
28956  (__pyx_v_dst->shape[__pyx_v_new_ndim]) = __pyx_v_new_shape;
28957 
28958  /* "View.MemoryView":882
28959  * dst.strides[new_ndim] = stride * step
28960  * dst.shape[new_ndim] = new_shape
28961  * dst.suboffsets[new_ndim] = suboffset # <<<<<<<<<<<<<<
28962  *
28963  *
28964  */
28965  (__pyx_v_dst->suboffsets[__pyx_v_new_ndim]) = __pyx_v_suboffset;
28966  }
28967  __pyx_L3:;
28968 
28969  /* "View.MemoryView":885
28970  *
28971  *
28972  * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
28973  * dst.data += start * stride
28974  * else:
28975  */
28976  __pyx_t_2 = (((__pyx_v_suboffset_dim[0]) < 0) != 0);
28977  if (__pyx_t_2) {
28978 
28979  /* "View.MemoryView":886
28980  *
28981  * if suboffset_dim[0] < 0:
28982  * dst.data += start * stride # <<<<<<<<<<<<<<
28983  * else:
28984  * dst.suboffsets[suboffset_dim[0]] += start * stride
28985  */
28986  __pyx_v_dst->data = (__pyx_v_dst->data + (__pyx_v_start * __pyx_v_stride));
28987 
28988  /* "View.MemoryView":885
28989  *
28990  *
28991  * if suboffset_dim[0] < 0: # <<<<<<<<<<<<<<
28992  * dst.data += start * stride
28993  * else:
28994  */
28995  goto __pyx_L23;
28996  }
28997 
28998  /* "View.MemoryView":888
28999  * dst.data += start * stride
29000  * else:
29001  * dst.suboffsets[suboffset_dim[0]] += start * stride # <<<<<<<<<<<<<<
29002  *
29003  * if suboffset >= 0:
29004  */
29005  /*else*/ {
29006  __pyx_t_3 = (__pyx_v_suboffset_dim[0]);
29007  (__pyx_v_dst->suboffsets[__pyx_t_3]) = ((__pyx_v_dst->suboffsets[__pyx_t_3]) + (__pyx_v_start * __pyx_v_stride));
29008  }
29009  __pyx_L23:;
29010 
29011  /* "View.MemoryView":890
29012  * dst.suboffsets[suboffset_dim[0]] += start * stride
29013  *
29014  * if suboffset >= 0: # <<<<<<<<<<<<<<
29015  * if not is_slice:
29016  * if new_ndim == 0:
29017  */
29018  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
29019  if (__pyx_t_2) {
29020 
29021  /* "View.MemoryView":891
29022  *
29023  * if suboffset >= 0:
29024  * if not is_slice: # <<<<<<<<<<<<<<
29025  * if new_ndim == 0:
29026  * dst.data = (<char **> dst.data)[0] + suboffset
29027  */
29028  __pyx_t_2 = ((!(__pyx_v_is_slice != 0)) != 0);
29029  if (__pyx_t_2) {
29030 
29031  /* "View.MemoryView":892
29032  * if suboffset >= 0:
29033  * if not is_slice:
29034  * if new_ndim == 0: # <<<<<<<<<<<<<<
29035  * dst.data = (<char **> dst.data)[0] + suboffset
29036  * else:
29037  */
29038  __pyx_t_2 = ((__pyx_v_new_ndim == 0) != 0);
29039  if (__pyx_t_2) {
29040 
29041  /* "View.MemoryView":893
29042  * if not is_slice:
29043  * if new_ndim == 0:
29044  * dst.data = (<char **> dst.data)[0] + suboffset # <<<<<<<<<<<<<<
29045  * else:
29046  * _err_dim(IndexError, "All dimensions preceding dimension %d "
29047  */
29048  __pyx_v_dst->data = ((((char **)__pyx_v_dst->data)[0]) + __pyx_v_suboffset);
29049 
29050  /* "View.MemoryView":892
29051  * if suboffset >= 0:
29052  * if not is_slice:
29053  * if new_ndim == 0: # <<<<<<<<<<<<<<
29054  * dst.data = (<char **> dst.data)[0] + suboffset
29055  * else:
29056  */
29057  goto __pyx_L26;
29058  }
29059 
29060  /* "View.MemoryView":895
29061  * dst.data = (<char **> dst.data)[0] + suboffset
29062  * else:
29063  * _err_dim(IndexError, "All dimensions preceding dimension %d " # <<<<<<<<<<<<<<
29064  * "must be indexed and not sliced", dim)
29065  * else:
29066  */
29067  /*else*/ {
29068 
29069  /* "View.MemoryView":896
29070  * else:
29071  * _err_dim(IndexError, "All dimensions preceding dimension %d "
29072  * "must be indexed and not sliced", dim) # <<<<<<<<<<<<<<
29073  * else:
29074  * suboffset_dim[0] = new_ndim
29075  */
29076  __pyx_t_3 = __pyx_memoryview_err_dim(__pyx_builtin_IndexError, ((char *)"All dimensions preceding dimension %d must be indexed and not sliced"), __pyx_v_dim); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 895, __pyx_L1_error)
29077  }
29078  __pyx_L26:;
29079 
29080  /* "View.MemoryView":891
29081  *
29082  * if suboffset >= 0:
29083  * if not is_slice: # <<<<<<<<<<<<<<
29084  * if new_ndim == 0:
29085  * dst.data = (<char **> dst.data)[0] + suboffset
29086  */
29087  goto __pyx_L25;
29088  }
29089 
29090  /* "View.MemoryView":898
29091  * "must be indexed and not sliced", dim)
29092  * else:
29093  * suboffset_dim[0] = new_ndim # <<<<<<<<<<<<<<
29094  *
29095  * return 0
29096  */
29097  /*else*/ {
29098  (__pyx_v_suboffset_dim[0]) = __pyx_v_new_ndim;
29099  }
29100  __pyx_L25:;
29101 
29102  /* "View.MemoryView":890
29103  * dst.suboffsets[suboffset_dim[0]] += start * stride
29104  *
29105  * if suboffset >= 0: # <<<<<<<<<<<<<<
29106  * if not is_slice:
29107  * if new_ndim == 0:
29108  */
29109  }
29110 
29111  /* "View.MemoryView":900
29112  * suboffset_dim[0] = new_ndim
29113  *
29114  * return 0 # <<<<<<<<<<<<<<
29115  *
29116  *
29117  */
29118  __pyx_r = 0;
29119  goto __pyx_L0;
29120 
29121  /* "View.MemoryView":803
29122  *
29123  * @cname('__pyx_memoryview_slice_memviewslice')
29124  * cdef int slice_memviewslice( # <<<<<<<<<<<<<<
29125  * __Pyx_memviewslice *dst,
29126  * Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset,
29127  */
29128 
29129  /* function exit code */
29130  __pyx_L1_error:;
29131  {
29132  #ifdef WITH_THREAD
29133  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
29134  #endif
29135  __Pyx_AddTraceback("View.MemoryView.slice_memviewslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
29136  #ifdef WITH_THREAD
29137  __Pyx_PyGILState_Release(__pyx_gilstate_save);
29138  #endif
29139  }
29140  __pyx_r = -1;
29141  __pyx_L0:;
29142  return __pyx_r;
29143 }
29144 
29145 /* "View.MemoryView":906
29146  *
29147  * @cname('__pyx_pybuffer_index')
29148  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
29149  * Py_ssize_t dim) except NULL:
29150  * cdef Py_ssize_t shape, stride, suboffset = -1
29151  */
29152 
29153 static char *__pyx_pybuffer_index(Py_buffer *__pyx_v_view, char *__pyx_v_bufp, Py_ssize_t __pyx_v_index, Py_ssize_t __pyx_v_dim) {
29154  Py_ssize_t __pyx_v_shape;
29155  Py_ssize_t __pyx_v_stride;
29156  Py_ssize_t __pyx_v_suboffset;
29157  Py_ssize_t __pyx_v_itemsize;
29158  char *__pyx_v_resultp;
29159  char *__pyx_r;
29160  __Pyx_RefNannyDeclarations
29161  Py_ssize_t __pyx_t_1;
29162  int __pyx_t_2;
29163  PyObject *__pyx_t_3 = NULL;
29164  PyObject *__pyx_t_4 = NULL;
29165  __Pyx_RefNannySetupContext("pybuffer_index", 0);
29166 
29167  /* "View.MemoryView":908
29168  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index,
29169  * Py_ssize_t dim) except NULL:
29170  * cdef Py_ssize_t shape, stride, suboffset = -1 # <<<<<<<<<<<<<<
29171  * cdef Py_ssize_t itemsize = view.itemsize
29172  * cdef char *resultp
29173  */
29174  __pyx_v_suboffset = -1L;
29175 
29176  /* "View.MemoryView":909
29177  * Py_ssize_t dim) except NULL:
29178  * cdef Py_ssize_t shape, stride, suboffset = -1
29179  * cdef Py_ssize_t itemsize = view.itemsize # <<<<<<<<<<<<<<
29180  * cdef char *resultp
29181  *
29182  */
29183  __pyx_t_1 = __pyx_v_view->itemsize;
29184  __pyx_v_itemsize = __pyx_t_1;
29185 
29186  /* "View.MemoryView":912
29187  * cdef char *resultp
29188  *
29189  * if view.ndim == 0: # <<<<<<<<<<<<<<
29190  * shape = view.len / itemsize
29191  * stride = itemsize
29192  */
29193  __pyx_t_2 = ((__pyx_v_view->ndim == 0) != 0);
29194  if (__pyx_t_2) {
29195 
29196  /* "View.MemoryView":913
29197  *
29198  * if view.ndim == 0:
29199  * shape = view.len / itemsize # <<<<<<<<<<<<<<
29200  * stride = itemsize
29201  * else:
29202  */
29203  if (unlikely(__pyx_v_itemsize == 0)) {
29204  PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero");
29205  __PYX_ERR(0, 913, __pyx_L1_error)
29206  }
29207  else if (sizeof(Py_ssize_t) == sizeof(long) && (!(((Py_ssize_t)-1) > 0)) && unlikely(__pyx_v_itemsize == (Py_ssize_t)-1) && unlikely(UNARY_NEG_WOULD_OVERFLOW(__pyx_v_view->len))) {
29208  PyErr_SetString(PyExc_OverflowError, "value too large to perform division");
29209  __PYX_ERR(0, 913, __pyx_L1_error)
29210  }
29211  __pyx_v_shape = __Pyx_div_Py_ssize_t(__pyx_v_view->len, __pyx_v_itemsize);
29212 
29213  /* "View.MemoryView":914
29214  * if view.ndim == 0:
29215  * shape = view.len / itemsize
29216  * stride = itemsize # <<<<<<<<<<<<<<
29217  * else:
29218  * shape = view.shape[dim]
29219  */
29220  __pyx_v_stride = __pyx_v_itemsize;
29221 
29222  /* "View.MemoryView":912
29223  * cdef char *resultp
29224  *
29225  * if view.ndim == 0: # <<<<<<<<<<<<<<
29226  * shape = view.len / itemsize
29227  * stride = itemsize
29228  */
29229  goto __pyx_L3;
29230  }
29231 
29232  /* "View.MemoryView":916
29233  * stride = itemsize
29234  * else:
29235  * shape = view.shape[dim] # <<<<<<<<<<<<<<
29236  * stride = view.strides[dim]
29237  * if view.suboffsets != NULL:
29238  */
29239  /*else*/ {
29240  __pyx_v_shape = (__pyx_v_view->shape[__pyx_v_dim]);
29241 
29242  /* "View.MemoryView":917
29243  * else:
29244  * shape = view.shape[dim]
29245  * stride = view.strides[dim] # <<<<<<<<<<<<<<
29246  * if view.suboffsets != NULL:
29247  * suboffset = view.suboffsets[dim]
29248  */
29249  __pyx_v_stride = (__pyx_v_view->strides[__pyx_v_dim]);
29250 
29251  /* "View.MemoryView":918
29252  * shape = view.shape[dim]
29253  * stride = view.strides[dim]
29254  * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
29255  * suboffset = view.suboffsets[dim]
29256  *
29257  */
29258  __pyx_t_2 = ((__pyx_v_view->suboffsets != NULL) != 0);
29259  if (__pyx_t_2) {
29260 
29261  /* "View.MemoryView":919
29262  * stride = view.strides[dim]
29263  * if view.suboffsets != NULL:
29264  * suboffset = view.suboffsets[dim] # <<<<<<<<<<<<<<
29265  *
29266  * if index < 0:
29267  */
29268  __pyx_v_suboffset = (__pyx_v_view->suboffsets[__pyx_v_dim]);
29269 
29270  /* "View.MemoryView":918
29271  * shape = view.shape[dim]
29272  * stride = view.strides[dim]
29273  * if view.suboffsets != NULL: # <<<<<<<<<<<<<<
29274  * suboffset = view.suboffsets[dim]
29275  *
29276  */
29277  }
29278  }
29279  __pyx_L3:;
29280 
29281  /* "View.MemoryView":921
29282  * suboffset = view.suboffsets[dim]
29283  *
29284  * if index < 0: # <<<<<<<<<<<<<<
29285  * index += view.shape[dim]
29286  * if index < 0:
29287  */
29288  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
29289  if (__pyx_t_2) {
29290 
29291  /* "View.MemoryView":922
29292  *
29293  * if index < 0:
29294  * index += view.shape[dim] # <<<<<<<<<<<<<<
29295  * if index < 0:
29296  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29297  */
29298  __pyx_v_index = (__pyx_v_index + (__pyx_v_view->shape[__pyx_v_dim]));
29299 
29300  /* "View.MemoryView":923
29301  * if index < 0:
29302  * index += view.shape[dim]
29303  * if index < 0: # <<<<<<<<<<<<<<
29304  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29305  *
29306  */
29307  __pyx_t_2 = ((__pyx_v_index < 0) != 0);
29308  if (unlikely(__pyx_t_2)) {
29309 
29310  /* "View.MemoryView":924
29311  * index += view.shape[dim]
29312  * if index < 0:
29313  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
29314  *
29315  * if index >= shape:
29316  */
29317  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 924, __pyx_L1_error)
29318  __Pyx_GOTREF(__pyx_t_3);
29319  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 924, __pyx_L1_error)
29320  __Pyx_GOTREF(__pyx_t_4);
29321  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29322  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 924, __pyx_L1_error)
29323  __Pyx_GOTREF(__pyx_t_3);
29324  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29325  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
29326  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29327  __PYX_ERR(0, 924, __pyx_L1_error)
29328 
29329  /* "View.MemoryView":923
29330  * if index < 0:
29331  * index += view.shape[dim]
29332  * if index < 0: # <<<<<<<<<<<<<<
29333  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29334  *
29335  */
29336  }
29337 
29338  /* "View.MemoryView":921
29339  * suboffset = view.suboffsets[dim]
29340  *
29341  * if index < 0: # <<<<<<<<<<<<<<
29342  * index += view.shape[dim]
29343  * if index < 0:
29344  */
29345  }
29346 
29347  /* "View.MemoryView":926
29348  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29349  *
29350  * if index >= shape: # <<<<<<<<<<<<<<
29351  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29352  *
29353  */
29354  __pyx_t_2 = ((__pyx_v_index >= __pyx_v_shape) != 0);
29355  if (unlikely(__pyx_t_2)) {
29356 
29357  /* "View.MemoryView":927
29358  *
29359  * if index >= shape:
29360  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim) # <<<<<<<<<<<<<<
29361  *
29362  * resultp = bufp + index * stride
29363  */
29364  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 927, __pyx_L1_error)
29365  __Pyx_GOTREF(__pyx_t_3);
29366  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 927, __pyx_L1_error)
29367  __Pyx_GOTREF(__pyx_t_4);
29368  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29369  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IndexError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 927, __pyx_L1_error)
29370  __Pyx_GOTREF(__pyx_t_3);
29371  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
29372  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
29373  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29374  __PYX_ERR(0, 927, __pyx_L1_error)
29375 
29376  /* "View.MemoryView":926
29377  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29378  *
29379  * if index >= shape: # <<<<<<<<<<<<<<
29380  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29381  *
29382  */
29383  }
29384 
29385  /* "View.MemoryView":929
29386  * raise IndexError("Out of bounds on buffer access (axis %d)" % dim)
29387  *
29388  * resultp = bufp + index * stride # <<<<<<<<<<<<<<
29389  * if suboffset >= 0:
29390  * resultp = (<char **> resultp)[0] + suboffset
29391  */
29392  __pyx_v_resultp = (__pyx_v_bufp + (__pyx_v_index * __pyx_v_stride));
29393 
29394  /* "View.MemoryView":930
29395  *
29396  * resultp = bufp + index * stride
29397  * if suboffset >= 0: # <<<<<<<<<<<<<<
29398  * resultp = (<char **> resultp)[0] + suboffset
29399  *
29400  */
29401  __pyx_t_2 = ((__pyx_v_suboffset >= 0) != 0);
29402  if (__pyx_t_2) {
29403 
29404  /* "View.MemoryView":931
29405  * resultp = bufp + index * stride
29406  * if suboffset >= 0:
29407  * resultp = (<char **> resultp)[0] + suboffset # <<<<<<<<<<<<<<
29408  *
29409  * return resultp
29410  */
29411  __pyx_v_resultp = ((((char **)__pyx_v_resultp)[0]) + __pyx_v_suboffset);
29412 
29413  /* "View.MemoryView":930
29414  *
29415  * resultp = bufp + index * stride
29416  * if suboffset >= 0: # <<<<<<<<<<<<<<
29417  * resultp = (<char **> resultp)[0] + suboffset
29418  *
29419  */
29420  }
29421 
29422  /* "View.MemoryView":933
29423  * resultp = (<char **> resultp)[0] + suboffset
29424  *
29425  * return resultp # <<<<<<<<<<<<<<
29426  *
29427  *
29428  */
29429  __pyx_r = __pyx_v_resultp;
29430  goto __pyx_L0;
29431 
29432  /* "View.MemoryView":906
29433  *
29434  * @cname('__pyx_pybuffer_index')
29435  * cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, # <<<<<<<<<<<<<<
29436  * Py_ssize_t dim) except NULL:
29437  * cdef Py_ssize_t shape, stride, suboffset = -1
29438  */
29439 
29440  /* function exit code */
29441  __pyx_L1_error:;
29442  __Pyx_XDECREF(__pyx_t_3);
29443  __Pyx_XDECREF(__pyx_t_4);
29444  __Pyx_AddTraceback("View.MemoryView.pybuffer_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
29445  __pyx_r = NULL;
29446  __pyx_L0:;
29447  __Pyx_RefNannyFinishContext();
29448  return __pyx_r;
29449 }
29450 
29451 /* "View.MemoryView":939
29452  *
29453  * @cname('__pyx_memslice_transpose')
29454  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
29455  * cdef int ndim = memslice.memview.view.ndim
29456  *
29457  */
29458 
29459 static int __pyx_memslice_transpose(__Pyx_memviewslice *__pyx_v_memslice) {
29460  int __pyx_v_ndim;
29461  Py_ssize_t *__pyx_v_shape;
29462  Py_ssize_t *__pyx_v_strides;
29463  int __pyx_v_i;
29464  int __pyx_v_j;
29465  int __pyx_r;
29466  int __pyx_t_1;
29467  Py_ssize_t *__pyx_t_2;
29468  long __pyx_t_3;
29469  long __pyx_t_4;
29470  Py_ssize_t __pyx_t_5;
29471  Py_ssize_t __pyx_t_6;
29472  int __pyx_t_7;
29473  int __pyx_t_8;
29474  int __pyx_t_9;
29475 
29476  /* "View.MemoryView":940
29477  * @cname('__pyx_memslice_transpose')
29478  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0:
29479  * cdef int ndim = memslice.memview.view.ndim # <<<<<<<<<<<<<<
29480  *
29481  * cdef Py_ssize_t *shape = memslice.shape
29482  */
29483  __pyx_t_1 = __pyx_v_memslice->memview->view.ndim;
29484  __pyx_v_ndim = __pyx_t_1;
29485 
29486  /* "View.MemoryView":942
29487  * cdef int ndim = memslice.memview.view.ndim
29488  *
29489  * cdef Py_ssize_t *shape = memslice.shape # <<<<<<<<<<<<<<
29490  * cdef Py_ssize_t *strides = memslice.strides
29491  *
29492  */
29493  __pyx_t_2 = __pyx_v_memslice->shape;
29494  __pyx_v_shape = __pyx_t_2;
29495 
29496  /* "View.MemoryView":943
29497  *
29498  * cdef Py_ssize_t *shape = memslice.shape
29499  * cdef Py_ssize_t *strides = memslice.strides # <<<<<<<<<<<<<<
29500  *
29501  *
29502  */
29503  __pyx_t_2 = __pyx_v_memslice->strides;
29504  __pyx_v_strides = __pyx_t_2;
29505 
29506  /* "View.MemoryView":947
29507  *
29508  * cdef int i, j
29509  * for i in range(ndim / 2): # <<<<<<<<<<<<<<
29510  * j = ndim - 1 - i
29511  * strides[i], strides[j] = strides[j], strides[i]
29512  */
29513  __pyx_t_3 = __Pyx_div_long(__pyx_v_ndim, 2);
29514  __pyx_t_4 = __pyx_t_3;
29515  for (__pyx_t_1 = 0; __pyx_t_1 < __pyx_t_4; __pyx_t_1+=1) {
29516  __pyx_v_i = __pyx_t_1;
29517 
29518  /* "View.MemoryView":948
29519  * cdef int i, j
29520  * for i in range(ndim / 2):
29521  * j = ndim - 1 - i # <<<<<<<<<<<<<<
29522  * strides[i], strides[j] = strides[j], strides[i]
29523  * shape[i], shape[j] = shape[j], shape[i]
29524  */
29525  __pyx_v_j = ((__pyx_v_ndim - 1) - __pyx_v_i);
29526 
29527  /* "View.MemoryView":949
29528  * for i in range(ndim / 2):
29529  * j = ndim - 1 - i
29530  * strides[i], strides[j] = strides[j], strides[i] # <<<<<<<<<<<<<<
29531  * shape[i], shape[j] = shape[j], shape[i]
29532  *
29533  */
29534  __pyx_t_5 = (__pyx_v_strides[__pyx_v_j]);
29535  __pyx_t_6 = (__pyx_v_strides[__pyx_v_i]);
29536  (__pyx_v_strides[__pyx_v_i]) = __pyx_t_5;
29537  (__pyx_v_strides[__pyx_v_j]) = __pyx_t_6;
29538 
29539  /* "View.MemoryView":950
29540  * j = ndim - 1 - i
29541  * strides[i], strides[j] = strides[j], strides[i]
29542  * shape[i], shape[j] = shape[j], shape[i] # <<<<<<<<<<<<<<
29543  *
29544  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
29545  */
29546  __pyx_t_6 = (__pyx_v_shape[__pyx_v_j]);
29547  __pyx_t_5 = (__pyx_v_shape[__pyx_v_i]);
29548  (__pyx_v_shape[__pyx_v_i]) = __pyx_t_6;
29549  (__pyx_v_shape[__pyx_v_j]) = __pyx_t_5;
29550 
29551  /* "View.MemoryView":952
29552  * shape[i], shape[j] = shape[j], shape[i]
29553  *
29554  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
29555  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
29556  *
29557  */
29558  __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_i]) >= 0) != 0);
29559  if (!__pyx_t_8) {
29560  } else {
29561  __pyx_t_7 = __pyx_t_8;
29562  goto __pyx_L6_bool_binop_done;
29563  }
29564  __pyx_t_8 = (((__pyx_v_memslice->suboffsets[__pyx_v_j]) >= 0) != 0);
29565  __pyx_t_7 = __pyx_t_8;
29566  __pyx_L6_bool_binop_done:;
29567  if (__pyx_t_7) {
29568 
29569  /* "View.MemoryView":953
29570  *
29571  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0:
29572  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions") # <<<<<<<<<<<<<<
29573  *
29574  * return 1
29575  */
29576  __pyx_t_9 = __pyx_memoryview_err(__pyx_builtin_ValueError, ((char *)"Cannot transpose memoryview with indirect dimensions")); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 953, __pyx_L1_error)
29577 
29578  /* "View.MemoryView":952
29579  * shape[i], shape[j] = shape[j], shape[i]
29580  *
29581  * if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: # <<<<<<<<<<<<<<
29582  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
29583  *
29584  */
29585  }
29586  }
29587 
29588  /* "View.MemoryView":955
29589  * _err(ValueError, "Cannot transpose memoryview with indirect dimensions")
29590  *
29591  * return 1 # <<<<<<<<<<<<<<
29592  *
29593  *
29594  */
29595  __pyx_r = 1;
29596  goto __pyx_L0;
29597 
29598  /* "View.MemoryView":939
29599  *
29600  * @cname('__pyx_memslice_transpose')
29601  * cdef int transpose_memslice(__Pyx_memviewslice *memslice) nogil except 0: # <<<<<<<<<<<<<<
29602  * cdef int ndim = memslice.memview.view.ndim
29603  *
29604  */
29605 
29606  /* function exit code */
29607  __pyx_L1_error:;
29608  {
29609  #ifdef WITH_THREAD
29610  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
29611  #endif
29612  __Pyx_AddTraceback("View.MemoryView.transpose_memslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
29613  #ifdef WITH_THREAD
29614  __Pyx_PyGILState_Release(__pyx_gilstate_save);
29615  #endif
29616  }
29617  __pyx_r = 0;
29618  __pyx_L0:;
29619  return __pyx_r;
29620 }
29621 
29622 /* "View.MemoryView":972
29623  * cdef int (*to_dtype_func)(char *, object) except 0
29624  *
29625  * def __dealloc__(self): # <<<<<<<<<<<<<<
29626  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
29627  *
29628  */
29629 
29630 /* Python wrapper */
29631 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self); /*proto*/
29632 static void __pyx_memoryviewslice___dealloc__(PyObject *__pyx_v_self) {
29633  __Pyx_RefNannyDeclarations
29634  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
29635  __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
29636 
29637  /* function exit code */
29638  __Pyx_RefNannyFinishContext();
29639 }
29640 
29641 static void __pyx_memoryviewslice___pyx_pf_15View_dot_MemoryView_16_memoryviewslice___dealloc__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
29642  __Pyx_RefNannyDeclarations
29643  __Pyx_RefNannySetupContext("__dealloc__", 0);
29644 
29645  /* "View.MemoryView":973
29646  *
29647  * def __dealloc__(self):
29648  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1) # <<<<<<<<<<<<<<
29649  *
29650  * cdef convert_item_to_object(self, char *itemp):
29651  */
29652  __PYX_XDEC_MEMVIEW((&__pyx_v_self->from_slice), 1);
29653 
29654  /* "View.MemoryView":972
29655  * cdef int (*to_dtype_func)(char *, object) except 0
29656  *
29657  * def __dealloc__(self): # <<<<<<<<<<<<<<
29658  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
29659  *
29660  */
29661 
29662  /* function exit code */
29663  __Pyx_RefNannyFinishContext();
29664 }
29665 
29666 /* "View.MemoryView":975
29667  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
29668  *
29669  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
29670  * if self.to_object_func != NULL:
29671  * return self.to_object_func(itemp)
29672  */
29673 
29674 static PyObject *__pyx_memoryviewslice_convert_item_to_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp) {
29675  PyObject *__pyx_r = NULL;
29676  __Pyx_RefNannyDeclarations
29677  int __pyx_t_1;
29678  PyObject *__pyx_t_2 = NULL;
29679  __Pyx_RefNannySetupContext("convert_item_to_object", 0);
29680 
29681  /* "View.MemoryView":976
29682  *
29683  * cdef convert_item_to_object(self, char *itemp):
29684  * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
29685  * return self.to_object_func(itemp)
29686  * else:
29687  */
29688  __pyx_t_1 = ((__pyx_v_self->to_object_func != NULL) != 0);
29689  if (__pyx_t_1) {
29690 
29691  /* "View.MemoryView":977
29692  * cdef convert_item_to_object(self, char *itemp):
29693  * if self.to_object_func != NULL:
29694  * return self.to_object_func(itemp) # <<<<<<<<<<<<<<
29695  * else:
29696  * return memoryview.convert_item_to_object(self, itemp)
29697  */
29698  __Pyx_XDECREF(__pyx_r);
29699  __pyx_t_2 = __pyx_v_self->to_object_func(__pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 977, __pyx_L1_error)
29700  __Pyx_GOTREF(__pyx_t_2);
29701  __pyx_r = __pyx_t_2;
29702  __pyx_t_2 = 0;
29703  goto __pyx_L0;
29704 
29705  /* "View.MemoryView":976
29706  *
29707  * cdef convert_item_to_object(self, char *itemp):
29708  * if self.to_object_func != NULL: # <<<<<<<<<<<<<<
29709  * return self.to_object_func(itemp)
29710  * else:
29711  */
29712  }
29713 
29714  /* "View.MemoryView":979
29715  * return self.to_object_func(itemp)
29716  * else:
29717  * return memoryview.convert_item_to_object(self, itemp) # <<<<<<<<<<<<<<
29718  *
29719  * cdef assign_item_from_object(self, char *itemp, object value):
29720  */
29721  /*else*/ {
29722  __Pyx_XDECREF(__pyx_r);
29723  __pyx_t_2 = __pyx_memoryview_convert_item_to_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 979, __pyx_L1_error)
29724  __Pyx_GOTREF(__pyx_t_2);
29725  __pyx_r = __pyx_t_2;
29726  __pyx_t_2 = 0;
29727  goto __pyx_L0;
29728  }
29729 
29730  /* "View.MemoryView":975
29731  * __PYX_XDEC_MEMVIEW(&self.from_slice, 1)
29732  *
29733  * cdef convert_item_to_object(self, char *itemp): # <<<<<<<<<<<<<<
29734  * if self.to_object_func != NULL:
29735  * return self.to_object_func(itemp)
29736  */
29737 
29738  /* function exit code */
29739  __pyx_L1_error:;
29740  __Pyx_XDECREF(__pyx_t_2);
29741  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.convert_item_to_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
29742  __pyx_r = 0;
29743  __pyx_L0:;
29744  __Pyx_XGIVEREF(__pyx_r);
29745  __Pyx_RefNannyFinishContext();
29746  return __pyx_r;
29747 }
29748 
29749 /* "View.MemoryView":981
29750  * return memoryview.convert_item_to_object(self, itemp)
29751  *
29752  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
29753  * if self.to_dtype_func != NULL:
29754  * self.to_dtype_func(itemp, value)
29755  */
29756 
29757 static PyObject *__pyx_memoryviewslice_assign_item_from_object(struct __pyx_memoryviewslice_obj *__pyx_v_self, char *__pyx_v_itemp, PyObject *__pyx_v_value) {
29758  PyObject *__pyx_r = NULL;
29759  __Pyx_RefNannyDeclarations
29760  int __pyx_t_1;
29761  int __pyx_t_2;
29762  PyObject *__pyx_t_3 = NULL;
29763  __Pyx_RefNannySetupContext("assign_item_from_object", 0);
29764 
29765  /* "View.MemoryView":982
29766  *
29767  * cdef assign_item_from_object(self, char *itemp, object value):
29768  * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
29769  * self.to_dtype_func(itemp, value)
29770  * else:
29771  */
29772  __pyx_t_1 = ((__pyx_v_self->to_dtype_func != NULL) != 0);
29773  if (__pyx_t_1) {
29774 
29775  /* "View.MemoryView":983
29776  * cdef assign_item_from_object(self, char *itemp, object value):
29777  * if self.to_dtype_func != NULL:
29778  * self.to_dtype_func(itemp, value) # <<<<<<<<<<<<<<
29779  * else:
29780  * memoryview.assign_item_from_object(self, itemp, value)
29781  */
29782  __pyx_t_2 = __pyx_v_self->to_dtype_func(__pyx_v_itemp, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(0, 983, __pyx_L1_error)
29783 
29784  /* "View.MemoryView":982
29785  *
29786  * cdef assign_item_from_object(self, char *itemp, object value):
29787  * if self.to_dtype_func != NULL: # <<<<<<<<<<<<<<
29788  * self.to_dtype_func(itemp, value)
29789  * else:
29790  */
29791  goto __pyx_L3;
29792  }
29793 
29794  /* "View.MemoryView":985
29795  * self.to_dtype_func(itemp, value)
29796  * else:
29797  * memoryview.assign_item_from_object(self, itemp, value) # <<<<<<<<<<<<<<
29798  *
29799  * @property
29800  */
29801  /*else*/ {
29802  __pyx_t_3 = __pyx_memoryview_assign_item_from_object(((struct __pyx_memoryview_obj *)__pyx_v_self), __pyx_v_itemp, __pyx_v_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 985, __pyx_L1_error)
29803  __Pyx_GOTREF(__pyx_t_3);
29804  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
29805  }
29806  __pyx_L3:;
29807 
29808  /* "View.MemoryView":981
29809  * return memoryview.convert_item_to_object(self, itemp)
29810  *
29811  * cdef assign_item_from_object(self, char *itemp, object value): # <<<<<<<<<<<<<<
29812  * if self.to_dtype_func != NULL:
29813  * self.to_dtype_func(itemp, value)
29814  */
29815 
29816  /* function exit code */
29817  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
29818  goto __pyx_L0;
29819  __pyx_L1_error:;
29820  __Pyx_XDECREF(__pyx_t_3);
29821  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.assign_item_from_object", __pyx_clineno, __pyx_lineno, __pyx_filename);
29822  __pyx_r = 0;
29823  __pyx_L0:;
29824  __Pyx_XGIVEREF(__pyx_r);
29825  __Pyx_RefNannyFinishContext();
29826  return __pyx_r;
29827 }
29828 
29829 /* "View.MemoryView":988
29830  *
29831  * @property
29832  * def base(self): # <<<<<<<<<<<<<<
29833  * return self.from_object
29834  *
29835  */
29836 
29837 /* Python wrapper */
29838 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self); /*proto*/
29839 static PyObject *__pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(PyObject *__pyx_v_self) {
29840  PyObject *__pyx_r = 0;
29841  __Pyx_RefNannyDeclarations
29842  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
29843  __pyx_r = __pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
29844 
29845  /* function exit code */
29846  __Pyx_RefNannyFinishContext();
29847  return __pyx_r;
29848 }
29849 
29850 static PyObject *__pyx_pf_15View_dot_MemoryView_16_memoryviewslice_4base___get__(struct __pyx_memoryviewslice_obj *__pyx_v_self) {
29851  PyObject *__pyx_r = NULL;
29852  __Pyx_RefNannyDeclarations
29853  __Pyx_RefNannySetupContext("__get__", 0);
29854 
29855  /* "View.MemoryView":989
29856  * @property
29857  * def base(self):
29858  * return self.from_object # <<<<<<<<<<<<<<
29859  *
29860  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)")
29861  */
29862  __Pyx_XDECREF(__pyx_r);
29863  __Pyx_INCREF(__pyx_v_self->from_object);
29864  __pyx_r = __pyx_v_self->from_object;
29865  goto __pyx_L0;
29866 
29867  /* "View.MemoryView":988
29868  *
29869  * @property
29870  * def base(self): # <<<<<<<<<<<<<<
29871  * return self.from_object
29872  *
29873  */
29874 
29875  /* function exit code */
29876  __pyx_L0:;
29877  __Pyx_XGIVEREF(__pyx_r);
29878  __Pyx_RefNannyFinishContext();
29879  return __pyx_r;
29880 }
29881 
29882 /* "(tree fragment)":1
29883  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
29884  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29885  * def __setstate_cython__(self, __pyx_state):
29886  */
29887 
29888 /* Python wrapper */
29889 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
29890 static PyObject *__pyx_pw___pyx_memoryviewslice_1__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
29891  PyObject *__pyx_r = 0;
29892  __Pyx_RefNannyDeclarations
29893  __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
29894  __pyx_r = __pyx_pf___pyx_memoryviewslice___reduce_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self));
29895 
29896  /* function exit code */
29897  __Pyx_RefNannyFinishContext();
29898  return __pyx_r;
29899 }
29900 
29901 static PyObject *__pyx_pf___pyx_memoryviewslice___reduce_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self) {
29902  PyObject *__pyx_r = NULL;
29903  __Pyx_RefNannyDeclarations
29904  PyObject *__pyx_t_1 = NULL;
29905  __Pyx_RefNannySetupContext("__reduce_cython__", 0);
29906 
29907  /* "(tree fragment)":2
29908  * def __reduce_cython__(self):
29909  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
29910  * def __setstate_cython__(self, __pyx_state):
29911  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29912  */
29913  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2, __pyx_L1_error)
29914  __Pyx_GOTREF(__pyx_t_1);
29915  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
29916  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29917  __PYX_ERR(0, 2, __pyx_L1_error)
29918 
29919  /* "(tree fragment)":1
29920  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
29921  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29922  * def __setstate_cython__(self, __pyx_state):
29923  */
29924 
29925  /* function exit code */
29926  __pyx_L1_error:;
29927  __Pyx_XDECREF(__pyx_t_1);
29928  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29929  __pyx_r = NULL;
29930  __Pyx_XGIVEREF(__pyx_r);
29931  __Pyx_RefNannyFinishContext();
29932  return __pyx_r;
29933 }
29934 
29935 /* "(tree fragment)":3
29936  * def __reduce_cython__(self):
29937  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29938  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
29939  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29940  */
29941 
29942 /* Python wrapper */
29943 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/
29944 static PyObject *__pyx_pw___pyx_memoryviewslice_3__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
29945  PyObject *__pyx_r = 0;
29946  __Pyx_RefNannyDeclarations
29947  __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
29948  __pyx_r = __pyx_pf___pyx_memoryviewslice_2__setstate_cython__(((struct __pyx_memoryviewslice_obj *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state));
29949 
29950  /* function exit code */
29951  __Pyx_RefNannyFinishContext();
29952  return __pyx_r;
29953 }
29954 
29955 static PyObject *__pyx_pf___pyx_memoryviewslice_2__setstate_cython__(CYTHON_UNUSED struct __pyx_memoryviewslice_obj *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
29956  PyObject *__pyx_r = NULL;
29957  __Pyx_RefNannyDeclarations
29958  PyObject *__pyx_t_1 = NULL;
29959  __Pyx_RefNannySetupContext("__setstate_cython__", 0);
29960 
29961  /* "(tree fragment)":4
29962  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29963  * def __setstate_cython__(self, __pyx_state):
29964  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
29965  */
29966  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error)
29967  __Pyx_GOTREF(__pyx_t_1);
29968  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
29969  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
29970  __PYX_ERR(0, 4, __pyx_L1_error)
29971 
29972  /* "(tree fragment)":3
29973  * def __reduce_cython__(self):
29974  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29975  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
29976  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
29977  */
29978 
29979  /* function exit code */
29980  __pyx_L1_error:;
29981  __Pyx_XDECREF(__pyx_t_1);
29982  __Pyx_AddTraceback("View.MemoryView._memoryviewslice.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
29983  __pyx_r = NULL;
29984  __Pyx_XGIVEREF(__pyx_r);
29985  __Pyx_RefNannyFinishContext();
29986  return __pyx_r;
29987 }
29988 
29989 /* "View.MemoryView":995
29990  *
29991  * @cname('__pyx_memoryview_fromslice')
29992  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
29993  * int ndim,
29994  * object (*to_object_func)(char *),
29995  */
29996 
29997 static PyObject *__pyx_memoryview_fromslice(__Pyx_memviewslice __pyx_v_memviewslice, int __pyx_v_ndim, PyObject *(*__pyx_v_to_object_func)(char *), int (*__pyx_v_to_dtype_func)(char *, PyObject *), int __pyx_v_dtype_is_object) {
29998  struct __pyx_memoryviewslice_obj *__pyx_v_result = 0;
29999  Py_ssize_t __pyx_v_suboffset;
30000  PyObject *__pyx_v_length = NULL;
30001  PyObject *__pyx_r = NULL;
30002  __Pyx_RefNannyDeclarations
30003  int __pyx_t_1;
30004  PyObject *__pyx_t_2 = NULL;
30005  PyObject *__pyx_t_3 = NULL;
30006  __Pyx_TypeInfo *__pyx_t_4;
30007  Py_buffer __pyx_t_5;
30008  Py_ssize_t *__pyx_t_6;
30009  Py_ssize_t *__pyx_t_7;
30010  Py_ssize_t *__pyx_t_8;
30011  Py_ssize_t __pyx_t_9;
30012  __Pyx_RefNannySetupContext("memoryview_fromslice", 0);
30013 
30014  /* "View.MemoryView":1003
30015  * cdef _memoryviewslice result
30016  *
30017  * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
30018  * return None
30019  *
30020  */
30021  __pyx_t_1 = ((((PyObject *)__pyx_v_memviewslice.memview) == Py_None) != 0);
30022  if (__pyx_t_1) {
30023 
30024  /* "View.MemoryView":1004
30025  *
30026  * if <PyObject *> memviewslice.memview == Py_None:
30027  * return None # <<<<<<<<<<<<<<
30028  *
30029  *
30030  */
30031  __Pyx_XDECREF(__pyx_r);
30032  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
30033  goto __pyx_L0;
30034 
30035  /* "View.MemoryView":1003
30036  * cdef _memoryviewslice result
30037  *
30038  * if <PyObject *> memviewslice.memview == Py_None: # <<<<<<<<<<<<<<
30039  * return None
30040  *
30041  */
30042  }
30043 
30044  /* "View.MemoryView":1009
30045  *
30046  *
30047  * result = _memoryviewslice(None, 0, dtype_is_object) # <<<<<<<<<<<<<<
30048  *
30049  * result.from_slice = memviewslice
30050  */
30051  __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_dtype_is_object); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1009, __pyx_L1_error)
30052  __Pyx_GOTREF(__pyx_t_2);
30053  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1009, __pyx_L1_error)
30054  __Pyx_GOTREF(__pyx_t_3);
30055  __Pyx_INCREF(Py_None);
30056  __Pyx_GIVEREF(Py_None);
30057  PyTuple_SET_ITEM(__pyx_t_3, 0, Py_None);
30058  __Pyx_INCREF(__pyx_int_0);
30059  __Pyx_GIVEREF(__pyx_int_0);
30060  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_int_0);
30061  __Pyx_GIVEREF(__pyx_t_2);
30062  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2);
30063  __pyx_t_2 = 0;
30064  __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_memoryviewslice_type), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1009, __pyx_L1_error)
30065  __Pyx_GOTREF(__pyx_t_2);
30066  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30067  __pyx_v_result = ((struct __pyx_memoryviewslice_obj *)__pyx_t_2);
30068  __pyx_t_2 = 0;
30069 
30070  /* "View.MemoryView":1011
30071  * result = _memoryviewslice(None, 0, dtype_is_object)
30072  *
30073  * result.from_slice = memviewslice # <<<<<<<<<<<<<<
30074  * __PYX_INC_MEMVIEW(&memviewslice, 1)
30075  *
30076  */
30077  __pyx_v_result->from_slice = __pyx_v_memviewslice;
30078 
30079  /* "View.MemoryView":1012
30080  *
30081  * result.from_slice = memviewslice
30082  * __PYX_INC_MEMVIEW(&memviewslice, 1) # <<<<<<<<<<<<<<
30083  *
30084  * result.from_object = (<memoryview> memviewslice.memview).base
30085  */
30086  __PYX_INC_MEMVIEW((&__pyx_v_memviewslice), 1);
30087 
30088  /* "View.MemoryView":1014
30089  * __PYX_INC_MEMVIEW(&memviewslice, 1)
30090  *
30091  * result.from_object = (<memoryview> memviewslice.memview).base # <<<<<<<<<<<<<<
30092  * result.typeinfo = memviewslice.memview.typeinfo
30093  *
30094  */
30095  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_memviewslice.memview), __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1014, __pyx_L1_error)
30096  __Pyx_GOTREF(__pyx_t_2);
30097  __Pyx_GIVEREF(__pyx_t_2);
30098  __Pyx_GOTREF(__pyx_v_result->from_object);
30099  __Pyx_DECREF(__pyx_v_result->from_object);
30100  __pyx_v_result->from_object = __pyx_t_2;
30101  __pyx_t_2 = 0;
30102 
30103  /* "View.MemoryView":1015
30104  *
30105  * result.from_object = (<memoryview> memviewslice.memview).base
30106  * result.typeinfo = memviewslice.memview.typeinfo # <<<<<<<<<<<<<<
30107  *
30108  * result.view = memviewslice.memview.view
30109  */
30110  __pyx_t_4 = __pyx_v_memviewslice.memview->typeinfo;
30111  __pyx_v_result->__pyx_base.typeinfo = __pyx_t_4;
30112 
30113  /* "View.MemoryView":1017
30114  * result.typeinfo = memviewslice.memview.typeinfo
30115  *
30116  * result.view = memviewslice.memview.view # <<<<<<<<<<<<<<
30117  * result.view.buf = <void *> memviewslice.data
30118  * result.view.ndim = ndim
30119  */
30120  __pyx_t_5 = __pyx_v_memviewslice.memview->view;
30121  __pyx_v_result->__pyx_base.view = __pyx_t_5;
30122 
30123  /* "View.MemoryView":1018
30124  *
30125  * result.view = memviewslice.memview.view
30126  * result.view.buf = <void *> memviewslice.data # <<<<<<<<<<<<<<
30127  * result.view.ndim = ndim
30128  * (<__pyx_buffer *> &result.view).obj = Py_None
30129  */
30130  __pyx_v_result->__pyx_base.view.buf = ((void *)__pyx_v_memviewslice.data);
30131 
30132  /* "View.MemoryView":1019
30133  * result.view = memviewslice.memview.view
30134  * result.view.buf = <void *> memviewslice.data
30135  * result.view.ndim = ndim # <<<<<<<<<<<<<<
30136  * (<__pyx_buffer *> &result.view).obj = Py_None
30137  * Py_INCREF(Py_None)
30138  */
30139  __pyx_v_result->__pyx_base.view.ndim = __pyx_v_ndim;
30140 
30141  /* "View.MemoryView":1020
30142  * result.view.buf = <void *> memviewslice.data
30143  * result.view.ndim = ndim
30144  * (<__pyx_buffer *> &result.view).obj = Py_None # <<<<<<<<<<<<<<
30145  * Py_INCREF(Py_None)
30146  *
30147  */
30148  ((Py_buffer *)(&__pyx_v_result->__pyx_base.view))->obj = Py_None;
30149 
30150  /* "View.MemoryView":1021
30151  * result.view.ndim = ndim
30152  * (<__pyx_buffer *> &result.view).obj = Py_None
30153  * Py_INCREF(Py_None) # <<<<<<<<<<<<<<
30154  *
30155  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
30156  */
30157  Py_INCREF(Py_None);
30158 
30159  /* "View.MemoryView":1023
30160  * Py_INCREF(Py_None)
30161  *
30162  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
30163  * result.flags = PyBUF_RECORDS
30164  * else:
30165  */
30166  __pyx_t_1 = ((((struct __pyx_memoryview_obj *)__pyx_v_memviewslice.memview)->flags & PyBUF_WRITABLE) != 0);
30167  if (__pyx_t_1) {
30168 
30169  /* "View.MemoryView":1024
30170  *
30171  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE:
30172  * result.flags = PyBUF_RECORDS # <<<<<<<<<<<<<<
30173  * else:
30174  * result.flags = PyBUF_RECORDS_RO
30175  */
30176  __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS;
30177 
30178  /* "View.MemoryView":1023
30179  * Py_INCREF(Py_None)
30180  *
30181  * if (<memoryview>memviewslice.memview).flags & PyBUF_WRITABLE: # <<<<<<<<<<<<<<
30182  * result.flags = PyBUF_RECORDS
30183  * else:
30184  */
30185  goto __pyx_L4;
30186  }
30187 
30188  /* "View.MemoryView":1026
30189  * result.flags = PyBUF_RECORDS
30190  * else:
30191  * result.flags = PyBUF_RECORDS_RO # <<<<<<<<<<<<<<
30192  *
30193  * result.view.shape = <Py_ssize_t *> result.from_slice.shape
30194  */
30195  /*else*/ {
30196  __pyx_v_result->__pyx_base.flags = PyBUF_RECORDS_RO;
30197  }
30198  __pyx_L4:;
30199 
30200  /* "View.MemoryView":1028
30201  * result.flags = PyBUF_RECORDS_RO
30202  *
30203  * result.view.shape = <Py_ssize_t *> result.from_slice.shape # <<<<<<<<<<<<<<
30204  * result.view.strides = <Py_ssize_t *> result.from_slice.strides
30205  *
30206  */
30207  __pyx_v_result->__pyx_base.view.shape = ((Py_ssize_t *)__pyx_v_result->from_slice.shape);
30208 
30209  /* "View.MemoryView":1029
30210  *
30211  * result.view.shape = <Py_ssize_t *> result.from_slice.shape
30212  * result.view.strides = <Py_ssize_t *> result.from_slice.strides # <<<<<<<<<<<<<<
30213  *
30214  *
30215  */
30216  __pyx_v_result->__pyx_base.view.strides = ((Py_ssize_t *)__pyx_v_result->from_slice.strides);
30217 
30218  /* "View.MemoryView":1032
30219  *
30220  *
30221  * result.view.suboffsets = NULL # <<<<<<<<<<<<<<
30222  * for suboffset in result.from_slice.suboffsets[:ndim]:
30223  * if suboffset >= 0:
30224  */
30225  __pyx_v_result->__pyx_base.view.suboffsets = NULL;
30226 
30227  /* "View.MemoryView":1033
30228  *
30229  * result.view.suboffsets = NULL
30230  * for suboffset in result.from_slice.suboffsets[:ndim]: # <<<<<<<<<<<<<<
30231  * if suboffset >= 0:
30232  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
30233  */
30234  __pyx_t_7 = (__pyx_v_result->from_slice.suboffsets + __pyx_v_ndim);
30235  for (__pyx_t_8 = __pyx_v_result->from_slice.suboffsets; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
30236  __pyx_t_6 = __pyx_t_8;
30237  __pyx_v_suboffset = (__pyx_t_6[0]);
30238 
30239  /* "View.MemoryView":1034
30240  * result.view.suboffsets = NULL
30241  * for suboffset in result.from_slice.suboffsets[:ndim]:
30242  * if suboffset >= 0: # <<<<<<<<<<<<<<
30243  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
30244  * break
30245  */
30246  __pyx_t_1 = ((__pyx_v_suboffset >= 0) != 0);
30247  if (__pyx_t_1) {
30248 
30249  /* "View.MemoryView":1035
30250  * for suboffset in result.from_slice.suboffsets[:ndim]:
30251  * if suboffset >= 0:
30252  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets # <<<<<<<<<<<<<<
30253  * break
30254  *
30255  */
30256  __pyx_v_result->__pyx_base.view.suboffsets = ((Py_ssize_t *)__pyx_v_result->from_slice.suboffsets);
30257 
30258  /* "View.MemoryView":1036
30259  * if suboffset >= 0:
30260  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
30261  * break # <<<<<<<<<<<<<<
30262  *
30263  * result.view.len = result.view.itemsize
30264  */
30265  goto __pyx_L6_break;
30266 
30267  /* "View.MemoryView":1034
30268  * result.view.suboffsets = NULL
30269  * for suboffset in result.from_slice.suboffsets[:ndim]:
30270  * if suboffset >= 0: # <<<<<<<<<<<<<<
30271  * result.view.suboffsets = <Py_ssize_t *> result.from_slice.suboffsets
30272  * break
30273  */
30274  }
30275  }
30276  __pyx_L6_break:;
30277 
30278  /* "View.MemoryView":1038
30279  * break
30280  *
30281  * result.view.len = result.view.itemsize # <<<<<<<<<<<<<<
30282  * for length in result.view.shape[:ndim]:
30283  * result.view.len *= length
30284  */
30285  __pyx_t_9 = __pyx_v_result->__pyx_base.view.itemsize;
30286  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
30287 
30288  /* "View.MemoryView":1039
30289  *
30290  * result.view.len = result.view.itemsize
30291  * for length in result.view.shape[:ndim]: # <<<<<<<<<<<<<<
30292  * result.view.len *= length
30293  *
30294  */
30295  __pyx_t_7 = (__pyx_v_result->__pyx_base.view.shape + __pyx_v_ndim);
30296  for (__pyx_t_8 = __pyx_v_result->__pyx_base.view.shape; __pyx_t_8 < __pyx_t_7; __pyx_t_8++) {
30297  __pyx_t_6 = __pyx_t_8;
30298  __pyx_t_2 = PyInt_FromSsize_t((__pyx_t_6[0])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L1_error)
30299  __Pyx_GOTREF(__pyx_t_2);
30300  __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_2);
30301  __pyx_t_2 = 0;
30302 
30303  /* "View.MemoryView":1040
30304  * result.view.len = result.view.itemsize
30305  * for length in result.view.shape[:ndim]:
30306  * result.view.len *= length # <<<<<<<<<<<<<<
30307  *
30308  * result.to_object_func = to_object_func
30309  */
30310  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_result->__pyx_base.view.len); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error)
30311  __Pyx_GOTREF(__pyx_t_2);
30312  __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_v_length); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1040, __pyx_L1_error)
30313  __Pyx_GOTREF(__pyx_t_3);
30314  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
30315  __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1040, __pyx_L1_error)
30316  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
30317  __pyx_v_result->__pyx_base.view.len = __pyx_t_9;
30318  }
30319 
30320  /* "View.MemoryView":1042
30321  * result.view.len *= length
30322  *
30323  * result.to_object_func = to_object_func # <<<<<<<<<<<<<<
30324  * result.to_dtype_func = to_dtype_func
30325  *
30326  */
30327  __pyx_v_result->to_object_func = __pyx_v_to_object_func;
30328 
30329  /* "View.MemoryView":1043
30330  *
30331  * result.to_object_func = to_object_func
30332  * result.to_dtype_func = to_dtype_func # <<<<<<<<<<<<<<
30333  *
30334  * return result
30335  */
30336  __pyx_v_result->to_dtype_func = __pyx_v_to_dtype_func;
30337 
30338  /* "View.MemoryView":1045
30339  * result.to_dtype_func = to_dtype_func
30340  *
30341  * return result # <<<<<<<<<<<<<<
30342  *
30343  * @cname('__pyx_memoryview_get_slice_from_memoryview')
30344  */
30345  __Pyx_XDECREF(__pyx_r);
30346  __Pyx_INCREF(((PyObject *)__pyx_v_result));
30347  __pyx_r = ((PyObject *)__pyx_v_result);
30348  goto __pyx_L0;
30349 
30350  /* "View.MemoryView":995
30351  *
30352  * @cname('__pyx_memoryview_fromslice')
30353  * cdef memoryview_fromslice(__Pyx_memviewslice memviewslice, # <<<<<<<<<<<<<<
30354  * int ndim,
30355  * object (*to_object_func)(char *),
30356  */
30357 
30358  /* function exit code */
30359  __pyx_L1_error:;
30360  __Pyx_XDECREF(__pyx_t_2);
30361  __Pyx_XDECREF(__pyx_t_3);
30362  __Pyx_AddTraceback("View.MemoryView.memoryview_fromslice", __pyx_clineno, __pyx_lineno, __pyx_filename);
30363  __pyx_r = 0;
30364  __pyx_L0:;
30365  __Pyx_XDECREF((PyObject *)__pyx_v_result);
30366  __Pyx_XDECREF(__pyx_v_length);
30367  __Pyx_XGIVEREF(__pyx_r);
30368  __Pyx_RefNannyFinishContext();
30369  return __pyx_r;
30370 }
30371 
30372 /* "View.MemoryView":1048
30373  *
30374  * @cname('__pyx_memoryview_get_slice_from_memoryview')
30375  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
30376  * __Pyx_memviewslice *mslice):
30377  * cdef _memoryviewslice obj
30378  */
30379 
30380 static __Pyx_memviewslice *__pyx_memoryview_get_slice_from_memoryview(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_mslice) {
30381  struct __pyx_memoryviewslice_obj *__pyx_v_obj = 0;
30382  __Pyx_memviewslice *__pyx_r;
30383  __Pyx_RefNannyDeclarations
30384  int __pyx_t_1;
30385  int __pyx_t_2;
30386  PyObject *__pyx_t_3 = NULL;
30387  __Pyx_RefNannySetupContext("get_slice_from_memview", 0);
30388 
30389  /* "View.MemoryView":1051
30390  * __Pyx_memviewslice *mslice):
30391  * cdef _memoryviewslice obj
30392  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
30393  * obj = memview
30394  * return &obj.from_slice
30395  */
30396  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
30397  __pyx_t_2 = (__pyx_t_1 != 0);
30398  if (__pyx_t_2) {
30399 
30400  /* "View.MemoryView":1052
30401  * cdef _memoryviewslice obj
30402  * if isinstance(memview, _memoryviewslice):
30403  * obj = memview # <<<<<<<<<<<<<<
30404  * return &obj.from_slice
30405  * else:
30406  */
30407  if (!(likely(((((PyObject *)__pyx_v_memview)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type))))) __PYX_ERR(0, 1052, __pyx_L1_error)
30408  __pyx_t_3 = ((PyObject *)__pyx_v_memview);
30409  __Pyx_INCREF(__pyx_t_3);
30410  __pyx_v_obj = ((struct __pyx_memoryviewslice_obj *)__pyx_t_3);
30411  __pyx_t_3 = 0;
30412 
30413  /* "View.MemoryView":1053
30414  * if isinstance(memview, _memoryviewslice):
30415  * obj = memview
30416  * return &obj.from_slice # <<<<<<<<<<<<<<
30417  * else:
30418  * slice_copy(memview, mslice)
30419  */
30420  __pyx_r = (&__pyx_v_obj->from_slice);
30421  goto __pyx_L0;
30422 
30423  /* "View.MemoryView":1051
30424  * __Pyx_memviewslice *mslice):
30425  * cdef _memoryviewslice obj
30426  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
30427  * obj = memview
30428  * return &obj.from_slice
30429  */
30430  }
30431 
30432  /* "View.MemoryView":1055
30433  * return &obj.from_slice
30434  * else:
30435  * slice_copy(memview, mslice) # <<<<<<<<<<<<<<
30436  * return mslice
30437  *
30438  */
30439  /*else*/ {
30440  __pyx_memoryview_slice_copy(__pyx_v_memview, __pyx_v_mslice);
30441 
30442  /* "View.MemoryView":1056
30443  * else:
30444  * slice_copy(memview, mslice)
30445  * return mslice # <<<<<<<<<<<<<<
30446  *
30447  * @cname('__pyx_memoryview_slice_copy')
30448  */
30449  __pyx_r = __pyx_v_mslice;
30450  goto __pyx_L0;
30451  }
30452 
30453  /* "View.MemoryView":1048
30454  *
30455  * @cname('__pyx_memoryview_get_slice_from_memoryview')
30456  * cdef __Pyx_memviewslice *get_slice_from_memview(memoryview memview, # <<<<<<<<<<<<<<
30457  * __Pyx_memviewslice *mslice):
30458  * cdef _memoryviewslice obj
30459  */
30460 
30461  /* function exit code */
30462  __pyx_L1_error:;
30463  __Pyx_XDECREF(__pyx_t_3);
30464  __Pyx_WriteUnraisable("View.MemoryView.get_slice_from_memview", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
30465  __pyx_r = 0;
30466  __pyx_L0:;
30467  __Pyx_XDECREF((PyObject *)__pyx_v_obj);
30468  __Pyx_RefNannyFinishContext();
30469  return __pyx_r;
30470 }
30471 
30472 /* "View.MemoryView":1059
30473  *
30474  * @cname('__pyx_memoryview_slice_copy')
30475  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
30476  * cdef int dim
30477  * cdef (Py_ssize_t*) shape, strides, suboffsets
30478  */
30479 
30480 static void __pyx_memoryview_slice_copy(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_dst) {
30481  int __pyx_v_dim;
30482  Py_ssize_t *__pyx_v_shape;
30483  Py_ssize_t *__pyx_v_strides;
30484  Py_ssize_t *__pyx_v_suboffsets;
30485  __Pyx_RefNannyDeclarations
30486  Py_ssize_t *__pyx_t_1;
30487  int __pyx_t_2;
30488  int __pyx_t_3;
30489  int __pyx_t_4;
30490  Py_ssize_t __pyx_t_5;
30491  __Pyx_RefNannySetupContext("slice_copy", 0);
30492 
30493  /* "View.MemoryView":1063
30494  * cdef (Py_ssize_t*) shape, strides, suboffsets
30495  *
30496  * shape = memview.view.shape # <<<<<<<<<<<<<<
30497  * strides = memview.view.strides
30498  * suboffsets = memview.view.suboffsets
30499  */
30500  __pyx_t_1 = __pyx_v_memview->view.shape;
30501  __pyx_v_shape = __pyx_t_1;
30502 
30503  /* "View.MemoryView":1064
30504  *
30505  * shape = memview.view.shape
30506  * strides = memview.view.strides # <<<<<<<<<<<<<<
30507  * suboffsets = memview.view.suboffsets
30508  *
30509  */
30510  __pyx_t_1 = __pyx_v_memview->view.strides;
30511  __pyx_v_strides = __pyx_t_1;
30512 
30513  /* "View.MemoryView":1065
30514  * shape = memview.view.shape
30515  * strides = memview.view.strides
30516  * suboffsets = memview.view.suboffsets # <<<<<<<<<<<<<<
30517  *
30518  * dst.memview = <__pyx_memoryview *> memview
30519  */
30520  __pyx_t_1 = __pyx_v_memview->view.suboffsets;
30521  __pyx_v_suboffsets = __pyx_t_1;
30522 
30523  /* "View.MemoryView":1067
30524  * suboffsets = memview.view.suboffsets
30525  *
30526  * dst.memview = <__pyx_memoryview *> memview # <<<<<<<<<<<<<<
30527  * dst.data = <char *> memview.view.buf
30528  *
30529  */
30530  __pyx_v_dst->memview = ((struct __pyx_memoryview_obj *)__pyx_v_memview);
30531 
30532  /* "View.MemoryView":1068
30533  *
30534  * dst.memview = <__pyx_memoryview *> memview
30535  * dst.data = <char *> memview.view.buf # <<<<<<<<<<<<<<
30536  *
30537  * for dim in range(memview.view.ndim):
30538  */
30539  __pyx_v_dst->data = ((char *)__pyx_v_memview->view.buf);
30540 
30541  /* "View.MemoryView":1070
30542  * dst.data = <char *> memview.view.buf
30543  *
30544  * for dim in range(memview.view.ndim): # <<<<<<<<<<<<<<
30545  * dst.shape[dim] = shape[dim]
30546  * dst.strides[dim] = strides[dim]
30547  */
30548  __pyx_t_2 = __pyx_v_memview->view.ndim;
30549  __pyx_t_3 = __pyx_t_2;
30550  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
30551  __pyx_v_dim = __pyx_t_4;
30552 
30553  /* "View.MemoryView":1071
30554  *
30555  * for dim in range(memview.view.ndim):
30556  * dst.shape[dim] = shape[dim] # <<<<<<<<<<<<<<
30557  * dst.strides[dim] = strides[dim]
30558  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
30559  */
30560  (__pyx_v_dst->shape[__pyx_v_dim]) = (__pyx_v_shape[__pyx_v_dim]);
30561 
30562  /* "View.MemoryView":1072
30563  * for dim in range(memview.view.ndim):
30564  * dst.shape[dim] = shape[dim]
30565  * dst.strides[dim] = strides[dim] # <<<<<<<<<<<<<<
30566  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1
30567  *
30568  */
30569  (__pyx_v_dst->strides[__pyx_v_dim]) = (__pyx_v_strides[__pyx_v_dim]);
30570 
30571  /* "View.MemoryView":1073
30572  * dst.shape[dim] = shape[dim]
30573  * dst.strides[dim] = strides[dim]
30574  * dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 # <<<<<<<<<<<<<<
30575  *
30576  * @cname('__pyx_memoryview_copy_object')
30577  */
30578  if ((__pyx_v_suboffsets != 0)) {
30579  __pyx_t_5 = (__pyx_v_suboffsets[__pyx_v_dim]);
30580  } else {
30581  __pyx_t_5 = -1L;
30582  }
30583  (__pyx_v_dst->suboffsets[__pyx_v_dim]) = __pyx_t_5;
30584  }
30585 
30586  /* "View.MemoryView":1059
30587  *
30588  * @cname('__pyx_memoryview_slice_copy')
30589  * cdef void slice_copy(memoryview memview, __Pyx_memviewslice *dst): # <<<<<<<<<<<<<<
30590  * cdef int dim
30591  * cdef (Py_ssize_t*) shape, strides, suboffsets
30592  */
30593 
30594  /* function exit code */
30595  __Pyx_RefNannyFinishContext();
30596 }
30597 
30598 /* "View.MemoryView":1076
30599  *
30600  * @cname('__pyx_memoryview_copy_object')
30601  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
30602  * "Create a new memoryview object"
30603  * cdef __Pyx_memviewslice memviewslice
30604  */
30605 
30606 static PyObject *__pyx_memoryview_copy_object(struct __pyx_memoryview_obj *__pyx_v_memview) {
30607  __Pyx_memviewslice __pyx_v_memviewslice;
30608  PyObject *__pyx_r = NULL;
30609  __Pyx_RefNannyDeclarations
30610  PyObject *__pyx_t_1 = NULL;
30611  __Pyx_RefNannySetupContext("memoryview_copy", 0);
30612 
30613  /* "View.MemoryView":1079
30614  * "Create a new memoryview object"
30615  * cdef __Pyx_memviewslice memviewslice
30616  * slice_copy(memview, &memviewslice) # <<<<<<<<<<<<<<
30617  * return memoryview_copy_from_slice(memview, &memviewslice)
30618  *
30619  */
30620  __pyx_memoryview_slice_copy(__pyx_v_memview, (&__pyx_v_memviewslice));
30621 
30622  /* "View.MemoryView":1080
30623  * cdef __Pyx_memviewslice memviewslice
30624  * slice_copy(memview, &memviewslice)
30625  * return memoryview_copy_from_slice(memview, &memviewslice) # <<<<<<<<<<<<<<
30626  *
30627  * @cname('__pyx_memoryview_copy_object_from_slice')
30628  */
30629  __Pyx_XDECREF(__pyx_r);
30630  __pyx_t_1 = __pyx_memoryview_copy_object_from_slice(__pyx_v_memview, (&__pyx_v_memviewslice)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error)
30631  __Pyx_GOTREF(__pyx_t_1);
30632  __pyx_r = __pyx_t_1;
30633  __pyx_t_1 = 0;
30634  goto __pyx_L0;
30635 
30636  /* "View.MemoryView":1076
30637  *
30638  * @cname('__pyx_memoryview_copy_object')
30639  * cdef memoryview_copy(memoryview memview): # <<<<<<<<<<<<<<
30640  * "Create a new memoryview object"
30641  * cdef __Pyx_memviewslice memviewslice
30642  */
30643 
30644  /* function exit code */
30645  __pyx_L1_error:;
30646  __Pyx_XDECREF(__pyx_t_1);
30647  __Pyx_AddTraceback("View.MemoryView.memoryview_copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
30648  __pyx_r = 0;
30649  __pyx_L0:;
30650  __Pyx_XGIVEREF(__pyx_r);
30651  __Pyx_RefNannyFinishContext();
30652  return __pyx_r;
30653 }
30654 
30655 /* "View.MemoryView":1083
30656  *
30657  * @cname('__pyx_memoryview_copy_object_from_slice')
30658  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
30659  * """
30660  * Create a new memoryview object from a given memoryview object and slice.
30661  */
30662 
30663 static PyObject *__pyx_memoryview_copy_object_from_slice(struct __pyx_memoryview_obj *__pyx_v_memview, __Pyx_memviewslice *__pyx_v_memviewslice) {
30664  PyObject *(*__pyx_v_to_object_func)(char *);
30665  int (*__pyx_v_to_dtype_func)(char *, PyObject *);
30666  PyObject *__pyx_r = NULL;
30667  __Pyx_RefNannyDeclarations
30668  int __pyx_t_1;
30669  int __pyx_t_2;
30670  PyObject *(*__pyx_t_3)(char *);
30671  int (*__pyx_t_4)(char *, PyObject *);
30672  PyObject *__pyx_t_5 = NULL;
30673  __Pyx_RefNannySetupContext("memoryview_copy_from_slice", 0);
30674 
30675  /* "View.MemoryView":1090
30676  * cdef int (*to_dtype_func)(char *, object) except 0
30677  *
30678  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
30679  * to_object_func = (<_memoryviewslice> memview).to_object_func
30680  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
30681  */
30682  __pyx_t_1 = __Pyx_TypeCheck(((PyObject *)__pyx_v_memview), __pyx_memoryviewslice_type);
30683  __pyx_t_2 = (__pyx_t_1 != 0);
30684  if (__pyx_t_2) {
30685 
30686  /* "View.MemoryView":1091
30687  *
30688  * if isinstance(memview, _memoryviewslice):
30689  * to_object_func = (<_memoryviewslice> memview).to_object_func # <<<<<<<<<<<<<<
30690  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
30691  * else:
30692  */
30693  __pyx_t_3 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_object_func;
30694  __pyx_v_to_object_func = __pyx_t_3;
30695 
30696  /* "View.MemoryView":1092
30697  * if isinstance(memview, _memoryviewslice):
30698  * to_object_func = (<_memoryviewslice> memview).to_object_func
30699  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func # <<<<<<<<<<<<<<
30700  * else:
30701  * to_object_func = NULL
30702  */
30703  __pyx_t_4 = ((struct __pyx_memoryviewslice_obj *)__pyx_v_memview)->to_dtype_func;
30704  __pyx_v_to_dtype_func = __pyx_t_4;
30705 
30706  /* "View.MemoryView":1090
30707  * cdef int (*to_dtype_func)(char *, object) except 0
30708  *
30709  * if isinstance(memview, _memoryviewslice): # <<<<<<<<<<<<<<
30710  * to_object_func = (<_memoryviewslice> memview).to_object_func
30711  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
30712  */
30713  goto __pyx_L3;
30714  }
30715 
30716  /* "View.MemoryView":1094
30717  * to_dtype_func = (<_memoryviewslice> memview).to_dtype_func
30718  * else:
30719  * to_object_func = NULL # <<<<<<<<<<<<<<
30720  * to_dtype_func = NULL
30721  *
30722  */
30723  /*else*/ {
30724  __pyx_v_to_object_func = NULL;
30725 
30726  /* "View.MemoryView":1095
30727  * else:
30728  * to_object_func = NULL
30729  * to_dtype_func = NULL # <<<<<<<<<<<<<<
30730  *
30731  * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
30732  */
30733  __pyx_v_to_dtype_func = NULL;
30734  }
30735  __pyx_L3:;
30736 
30737  /* "View.MemoryView":1097
30738  * to_dtype_func = NULL
30739  *
30740  * return memoryview_fromslice(memviewslice[0], memview.view.ndim, # <<<<<<<<<<<<<<
30741  * to_object_func, to_dtype_func,
30742  * memview.dtype_is_object)
30743  */
30744  __Pyx_XDECREF(__pyx_r);
30745 
30746  /* "View.MemoryView":1099
30747  * return memoryview_fromslice(memviewslice[0], memview.view.ndim,
30748  * to_object_func, to_dtype_func,
30749  * memview.dtype_is_object) # <<<<<<<<<<<<<<
30750  *
30751  *
30752  */
30753  __pyx_t_5 = __pyx_memoryview_fromslice((__pyx_v_memviewslice[0]), __pyx_v_memview->view.ndim, __pyx_v_to_object_func, __pyx_v_to_dtype_func, __pyx_v_memview->dtype_is_object); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1097, __pyx_L1_error)
30754  __Pyx_GOTREF(__pyx_t_5);
30755  __pyx_r = __pyx_t_5;
30756  __pyx_t_5 = 0;
30757  goto __pyx_L0;
30758 
30759  /* "View.MemoryView":1083
30760  *
30761  * @cname('__pyx_memoryview_copy_object_from_slice')
30762  * cdef memoryview_copy_from_slice(memoryview memview, __Pyx_memviewslice *memviewslice): # <<<<<<<<<<<<<<
30763  * """
30764  * Create a new memoryview object from a given memoryview object and slice.
30765  */
30766 
30767  /* function exit code */
30768  __pyx_L1_error:;
30769  __Pyx_XDECREF(__pyx_t_5);
30770  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_from_slice", __pyx_clineno, __pyx_lineno, __pyx_filename);
30771  __pyx_r = 0;
30772  __pyx_L0:;
30773  __Pyx_XGIVEREF(__pyx_r);
30774  __Pyx_RefNannyFinishContext();
30775  return __pyx_r;
30776 }
30777 
30778 /* "View.MemoryView":1105
30779  *
30780  *
30781  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
30782  * if arg < 0:
30783  * return -arg
30784  */
30785 
30786 static Py_ssize_t abs_py_ssize_t(Py_ssize_t __pyx_v_arg) {
30787  Py_ssize_t __pyx_r;
30788  int __pyx_t_1;
30789 
30790  /* "View.MemoryView":1106
30791  *
30792  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
30793  * if arg < 0: # <<<<<<<<<<<<<<
30794  * return -arg
30795  * else:
30796  */
30797  __pyx_t_1 = ((__pyx_v_arg < 0) != 0);
30798  if (__pyx_t_1) {
30799 
30800  /* "View.MemoryView":1107
30801  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
30802  * if arg < 0:
30803  * return -arg # <<<<<<<<<<<<<<
30804  * else:
30805  * return arg
30806  */
30807  __pyx_r = (-__pyx_v_arg);
30808  goto __pyx_L0;
30809 
30810  /* "View.MemoryView":1106
30811  *
30812  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil:
30813  * if arg < 0: # <<<<<<<<<<<<<<
30814  * return -arg
30815  * else:
30816  */
30817  }
30818 
30819  /* "View.MemoryView":1109
30820  * return -arg
30821  * else:
30822  * return arg # <<<<<<<<<<<<<<
30823  *
30824  * @cname('__pyx_get_best_slice_order')
30825  */
30826  /*else*/ {
30827  __pyx_r = __pyx_v_arg;
30828  goto __pyx_L0;
30829  }
30830 
30831  /* "View.MemoryView":1105
30832  *
30833  *
30834  * cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: # <<<<<<<<<<<<<<
30835  * if arg < 0:
30836  * return -arg
30837  */
30838 
30839  /* function exit code */
30840  __pyx_L0:;
30841  return __pyx_r;
30842 }
30843 
30844 /* "View.MemoryView":1112
30845  *
30846  * @cname('__pyx_get_best_slice_order')
30847  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
30848  * """
30849  * Figure out the best memory access order for a given slice.
30850  */
30851 
30852 static char __pyx_get_best_slice_order(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim) {
30853  int __pyx_v_i;
30854  Py_ssize_t __pyx_v_c_stride;
30855  Py_ssize_t __pyx_v_f_stride;
30856  char __pyx_r;
30857  int __pyx_t_1;
30858  int __pyx_t_2;
30859  int __pyx_t_3;
30860  int __pyx_t_4;
30861 
30862  /* "View.MemoryView":1117
30863  * """
30864  * cdef int i
30865  * cdef Py_ssize_t c_stride = 0 # <<<<<<<<<<<<<<
30866  * cdef Py_ssize_t f_stride = 0
30867  *
30868  */
30869  __pyx_v_c_stride = 0;
30870 
30871  /* "View.MemoryView":1118
30872  * cdef int i
30873  * cdef Py_ssize_t c_stride = 0
30874  * cdef Py_ssize_t f_stride = 0 # <<<<<<<<<<<<<<
30875  *
30876  * for i in range(ndim - 1, -1, -1):
30877  */
30878  __pyx_v_f_stride = 0;
30879 
30880  /* "View.MemoryView":1120
30881  * cdef Py_ssize_t f_stride = 0
30882  *
30883  * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
30884  * if mslice.shape[i] > 1:
30885  * c_stride = mslice.strides[i]
30886  */
30887  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
30888  __pyx_v_i = __pyx_t_1;
30889 
30890  /* "View.MemoryView":1121
30891  *
30892  * for i in range(ndim - 1, -1, -1):
30893  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
30894  * c_stride = mslice.strides[i]
30895  * break
30896  */
30897  __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
30898  if (__pyx_t_2) {
30899 
30900  /* "View.MemoryView":1122
30901  * for i in range(ndim - 1, -1, -1):
30902  * if mslice.shape[i] > 1:
30903  * c_stride = mslice.strides[i] # <<<<<<<<<<<<<<
30904  * break
30905  *
30906  */
30907  __pyx_v_c_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
30908 
30909  /* "View.MemoryView":1123
30910  * if mslice.shape[i] > 1:
30911  * c_stride = mslice.strides[i]
30912  * break # <<<<<<<<<<<<<<
30913  *
30914  * for i in range(ndim):
30915  */
30916  goto __pyx_L4_break;
30917 
30918  /* "View.MemoryView":1121
30919  *
30920  * for i in range(ndim - 1, -1, -1):
30921  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
30922  * c_stride = mslice.strides[i]
30923  * break
30924  */
30925  }
30926  }
30927  __pyx_L4_break:;
30928 
30929  /* "View.MemoryView":1125
30930  * break
30931  *
30932  * for i in range(ndim): # <<<<<<<<<<<<<<
30933  * if mslice.shape[i] > 1:
30934  * f_stride = mslice.strides[i]
30935  */
30936  __pyx_t_1 = __pyx_v_ndim;
30937  __pyx_t_3 = __pyx_t_1;
30938  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
30939  __pyx_v_i = __pyx_t_4;
30940 
30941  /* "View.MemoryView":1126
30942  *
30943  * for i in range(ndim):
30944  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
30945  * f_stride = mslice.strides[i]
30946  * break
30947  */
30948  __pyx_t_2 = (((__pyx_v_mslice->shape[__pyx_v_i]) > 1) != 0);
30949  if (__pyx_t_2) {
30950 
30951  /* "View.MemoryView":1127
30952  * for i in range(ndim):
30953  * if mslice.shape[i] > 1:
30954  * f_stride = mslice.strides[i] # <<<<<<<<<<<<<<
30955  * break
30956  *
30957  */
30958  __pyx_v_f_stride = (__pyx_v_mslice->strides[__pyx_v_i]);
30959 
30960  /* "View.MemoryView":1128
30961  * if mslice.shape[i] > 1:
30962  * f_stride = mslice.strides[i]
30963  * break # <<<<<<<<<<<<<<
30964  *
30965  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
30966  */
30967  goto __pyx_L7_break;
30968 
30969  /* "View.MemoryView":1126
30970  *
30971  * for i in range(ndim):
30972  * if mslice.shape[i] > 1: # <<<<<<<<<<<<<<
30973  * f_stride = mslice.strides[i]
30974  * break
30975  */
30976  }
30977  }
30978  __pyx_L7_break:;
30979 
30980  /* "View.MemoryView":1130
30981  * break
30982  *
30983  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
30984  * return 'C'
30985  * else:
30986  */
30987  __pyx_t_2 = ((abs_py_ssize_t(__pyx_v_c_stride) <= abs_py_ssize_t(__pyx_v_f_stride)) != 0);
30988  if (__pyx_t_2) {
30989 
30990  /* "View.MemoryView":1131
30991  *
30992  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride):
30993  * return 'C' # <<<<<<<<<<<<<<
30994  * else:
30995  * return 'F'
30996  */
30997  __pyx_r = 'C';
30998  goto __pyx_L0;
30999 
31000  /* "View.MemoryView":1130
31001  * break
31002  *
31003  * if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): # <<<<<<<<<<<<<<
31004  * return 'C'
31005  * else:
31006  */
31007  }
31008 
31009  /* "View.MemoryView":1133
31010  * return 'C'
31011  * else:
31012  * return 'F' # <<<<<<<<<<<<<<
31013  *
31014  * @cython.cdivision(True)
31015  */
31016  /*else*/ {
31017  __pyx_r = 'F';
31018  goto __pyx_L0;
31019  }
31020 
31021  /* "View.MemoryView":1112
31022  *
31023  * @cname('__pyx_get_best_slice_order')
31024  * cdef char get_best_order(__Pyx_memviewslice *mslice, int ndim) nogil: # <<<<<<<<<<<<<<
31025  * """
31026  * Figure out the best memory access order for a given slice.
31027  */
31028 
31029  /* function exit code */
31030  __pyx_L0:;
31031  return __pyx_r;
31032 }
31033 
31034 /* "View.MemoryView":1136
31035  *
31036  * @cython.cdivision(True)
31037  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
31038  * char *dst_data, Py_ssize_t *dst_strides,
31039  * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
31040  */
31041 
31042 static void _copy_strided_to_strided(char *__pyx_v_src_data, Py_ssize_t *__pyx_v_src_strides, char *__pyx_v_dst_data, Py_ssize_t *__pyx_v_dst_strides, Py_ssize_t *__pyx_v_src_shape, Py_ssize_t *__pyx_v_dst_shape, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
31043  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
31044  CYTHON_UNUSED Py_ssize_t __pyx_v_src_extent;
31045  Py_ssize_t __pyx_v_dst_extent;
31046  Py_ssize_t __pyx_v_src_stride;
31047  Py_ssize_t __pyx_v_dst_stride;
31048  int __pyx_t_1;
31049  int __pyx_t_2;
31050  int __pyx_t_3;
31051  Py_ssize_t __pyx_t_4;
31052  Py_ssize_t __pyx_t_5;
31053  Py_ssize_t __pyx_t_6;
31054 
31055  /* "View.MemoryView":1143
31056  *
31057  * cdef Py_ssize_t i
31058  * cdef Py_ssize_t src_extent = src_shape[0] # <<<<<<<<<<<<<<
31059  * cdef Py_ssize_t dst_extent = dst_shape[0]
31060  * cdef Py_ssize_t src_stride = src_strides[0]
31061  */
31062  __pyx_v_src_extent = (__pyx_v_src_shape[0]);
31063 
31064  /* "View.MemoryView":1144
31065  * cdef Py_ssize_t i
31066  * cdef Py_ssize_t src_extent = src_shape[0]
31067  * cdef Py_ssize_t dst_extent = dst_shape[0] # <<<<<<<<<<<<<<
31068  * cdef Py_ssize_t src_stride = src_strides[0]
31069  * cdef Py_ssize_t dst_stride = dst_strides[0]
31070  */
31071  __pyx_v_dst_extent = (__pyx_v_dst_shape[0]);
31072 
31073  /* "View.MemoryView":1145
31074  * cdef Py_ssize_t src_extent = src_shape[0]
31075  * cdef Py_ssize_t dst_extent = dst_shape[0]
31076  * cdef Py_ssize_t src_stride = src_strides[0] # <<<<<<<<<<<<<<
31077  * cdef Py_ssize_t dst_stride = dst_strides[0]
31078  *
31079  */
31080  __pyx_v_src_stride = (__pyx_v_src_strides[0]);
31081 
31082  /* "View.MemoryView":1146
31083  * cdef Py_ssize_t dst_extent = dst_shape[0]
31084  * cdef Py_ssize_t src_stride = src_strides[0]
31085  * cdef Py_ssize_t dst_stride = dst_strides[0] # <<<<<<<<<<<<<<
31086  *
31087  * if ndim == 1:
31088  */
31089  __pyx_v_dst_stride = (__pyx_v_dst_strides[0]);
31090 
31091  /* "View.MemoryView":1148
31092  * cdef Py_ssize_t dst_stride = dst_strides[0]
31093  *
31094  * if ndim == 1: # <<<<<<<<<<<<<<
31095  * if (src_stride > 0 and dst_stride > 0 and
31096  * <size_t> src_stride == itemsize == <size_t> dst_stride):
31097  */
31098  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
31099  if (__pyx_t_1) {
31100 
31101  /* "View.MemoryView":1149
31102  *
31103  * if ndim == 1:
31104  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
31105  * <size_t> src_stride == itemsize == <size_t> dst_stride):
31106  * memcpy(dst_data, src_data, itemsize * dst_extent)
31107  */
31108  __pyx_t_2 = ((__pyx_v_src_stride > 0) != 0);
31109  if (__pyx_t_2) {
31110  } else {
31111  __pyx_t_1 = __pyx_t_2;
31112  goto __pyx_L5_bool_binop_done;
31113  }
31114  __pyx_t_2 = ((__pyx_v_dst_stride > 0) != 0);
31115  if (__pyx_t_2) {
31116  } else {
31117  __pyx_t_1 = __pyx_t_2;
31118  goto __pyx_L5_bool_binop_done;
31119  }
31120 
31121  /* "View.MemoryView":1150
31122  * if ndim == 1:
31123  * if (src_stride > 0 and dst_stride > 0 and
31124  * <size_t> src_stride == itemsize == <size_t> dst_stride): # <<<<<<<<<<<<<<
31125  * memcpy(dst_data, src_data, itemsize * dst_extent)
31126  * else:
31127  */
31128  __pyx_t_2 = (((size_t)__pyx_v_src_stride) == __pyx_v_itemsize);
31129  if (__pyx_t_2) {
31130  __pyx_t_2 = (__pyx_v_itemsize == ((size_t)__pyx_v_dst_stride));
31131  }
31132  __pyx_t_3 = (__pyx_t_2 != 0);
31133  __pyx_t_1 = __pyx_t_3;
31134  __pyx_L5_bool_binop_done:;
31135 
31136  /* "View.MemoryView":1149
31137  *
31138  * if ndim == 1:
31139  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
31140  * <size_t> src_stride == itemsize == <size_t> dst_stride):
31141  * memcpy(dst_data, src_data, itemsize * dst_extent)
31142  */
31143  if (__pyx_t_1) {
31144 
31145  /* "View.MemoryView":1151
31146  * if (src_stride > 0 and dst_stride > 0 and
31147  * <size_t> src_stride == itemsize == <size_t> dst_stride):
31148  * memcpy(dst_data, src_data, itemsize * dst_extent) # <<<<<<<<<<<<<<
31149  * else:
31150  * for i in range(dst_extent):
31151  */
31152  (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, (__pyx_v_itemsize * __pyx_v_dst_extent)));
31153 
31154  /* "View.MemoryView":1149
31155  *
31156  * if ndim == 1:
31157  * if (src_stride > 0 and dst_stride > 0 and # <<<<<<<<<<<<<<
31158  * <size_t> src_stride == itemsize == <size_t> dst_stride):
31159  * memcpy(dst_data, src_data, itemsize * dst_extent)
31160  */
31161  goto __pyx_L4;
31162  }
31163 
31164  /* "View.MemoryView":1153
31165  * memcpy(dst_data, src_data, itemsize * dst_extent)
31166  * else:
31167  * for i in range(dst_extent): # <<<<<<<<<<<<<<
31168  * memcpy(dst_data, src_data, itemsize)
31169  * src_data += src_stride
31170  */
31171  /*else*/ {
31172  __pyx_t_4 = __pyx_v_dst_extent;
31173  __pyx_t_5 = __pyx_t_4;
31174  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
31175  __pyx_v_i = __pyx_t_6;
31176 
31177  /* "View.MemoryView":1154
31178  * else:
31179  * for i in range(dst_extent):
31180  * memcpy(dst_data, src_data, itemsize) # <<<<<<<<<<<<<<
31181  * src_data += src_stride
31182  * dst_data += dst_stride
31183  */
31184  (void)(memcpy(__pyx_v_dst_data, __pyx_v_src_data, __pyx_v_itemsize));
31185 
31186  /* "View.MemoryView":1155
31187  * for i in range(dst_extent):
31188  * memcpy(dst_data, src_data, itemsize)
31189  * src_data += src_stride # <<<<<<<<<<<<<<
31190  * dst_data += dst_stride
31191  * else:
31192  */
31193  __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
31194 
31195  /* "View.MemoryView":1156
31196  * memcpy(dst_data, src_data, itemsize)
31197  * src_data += src_stride
31198  * dst_data += dst_stride # <<<<<<<<<<<<<<
31199  * else:
31200  * for i in range(dst_extent):
31201  */
31202  __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
31203  }
31204  }
31205  __pyx_L4:;
31206 
31207  /* "View.MemoryView":1148
31208  * cdef Py_ssize_t dst_stride = dst_strides[0]
31209  *
31210  * if ndim == 1: # <<<<<<<<<<<<<<
31211  * if (src_stride > 0 and dst_stride > 0 and
31212  * <size_t> src_stride == itemsize == <size_t> dst_stride):
31213  */
31214  goto __pyx_L3;
31215  }
31216 
31217  /* "View.MemoryView":1158
31218  * dst_data += dst_stride
31219  * else:
31220  * for i in range(dst_extent): # <<<<<<<<<<<<<<
31221  * _copy_strided_to_strided(src_data, src_strides + 1,
31222  * dst_data, dst_strides + 1,
31223  */
31224  /*else*/ {
31225  __pyx_t_4 = __pyx_v_dst_extent;
31226  __pyx_t_5 = __pyx_t_4;
31227  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
31228  __pyx_v_i = __pyx_t_6;
31229 
31230  /* "View.MemoryView":1159
31231  * else:
31232  * for i in range(dst_extent):
31233  * _copy_strided_to_strided(src_data, src_strides + 1, # <<<<<<<<<<<<<<
31234  * dst_data, dst_strides + 1,
31235  * src_shape + 1, dst_shape + 1,
31236  */
31237  _copy_strided_to_strided(__pyx_v_src_data, (__pyx_v_src_strides + 1), __pyx_v_dst_data, (__pyx_v_dst_strides + 1), (__pyx_v_src_shape + 1), (__pyx_v_dst_shape + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize);
31238 
31239  /* "View.MemoryView":1163
31240  * src_shape + 1, dst_shape + 1,
31241  * ndim - 1, itemsize)
31242  * src_data += src_stride # <<<<<<<<<<<<<<
31243  * dst_data += dst_stride
31244  *
31245  */
31246  __pyx_v_src_data = (__pyx_v_src_data + __pyx_v_src_stride);
31247 
31248  /* "View.MemoryView":1164
31249  * ndim - 1, itemsize)
31250  * src_data += src_stride
31251  * dst_data += dst_stride # <<<<<<<<<<<<<<
31252  *
31253  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src,
31254  */
31255  __pyx_v_dst_data = (__pyx_v_dst_data + __pyx_v_dst_stride);
31256  }
31257  }
31258  __pyx_L3:;
31259 
31260  /* "View.MemoryView":1136
31261  *
31262  * @cython.cdivision(True)
31263  * cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, # <<<<<<<<<<<<<<
31264  * char *dst_data, Py_ssize_t *dst_strides,
31265  * Py_ssize_t *src_shape, Py_ssize_t *dst_shape,
31266  */
31267 
31268  /* function exit code */
31269 }
31270 
31271 /* "View.MemoryView":1166
31272  * dst_data += dst_stride
31273  *
31274  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
31275  * __Pyx_memviewslice *dst,
31276  * int ndim, size_t itemsize) nogil:
31277  */
31278 
31279 static void copy_strided_to_strided(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize) {
31280 
31281  /* "View.MemoryView":1169
31282  * __Pyx_memviewslice *dst,
31283  * int ndim, size_t itemsize) nogil:
31284  * _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, # <<<<<<<<<<<<<<
31285  * src.shape, dst.shape, ndim, itemsize)
31286  *
31287  */
31288  _copy_strided_to_strided(__pyx_v_src->data, __pyx_v_src->strides, __pyx_v_dst->data, __pyx_v_dst->strides, __pyx_v_src->shape, __pyx_v_dst->shape, __pyx_v_ndim, __pyx_v_itemsize);
31289 
31290  /* "View.MemoryView":1166
31291  * dst_data += dst_stride
31292  *
31293  * cdef void copy_strided_to_strided(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
31294  * __Pyx_memviewslice *dst,
31295  * int ndim, size_t itemsize) nogil:
31296  */
31297 
31298  /* function exit code */
31299 }
31300 
31301 /* "View.MemoryView":1173
31302  *
31303  * @cname('__pyx_memoryview_slice_get_size')
31304  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
31305  * "Return the size of the memory occupied by the slice in number of bytes"
31306  * cdef int i
31307  */
31308 
31309 static Py_ssize_t __pyx_memoryview_slice_get_size(__Pyx_memviewslice *__pyx_v_src, int __pyx_v_ndim) {
31310  int __pyx_v_i;
31311  Py_ssize_t __pyx_v_size;
31312  Py_ssize_t __pyx_r;
31313  Py_ssize_t __pyx_t_1;
31314  int __pyx_t_2;
31315  int __pyx_t_3;
31316  int __pyx_t_4;
31317 
31318  /* "View.MemoryView":1176
31319  * "Return the size of the memory occupied by the slice in number of bytes"
31320  * cdef int i
31321  * cdef Py_ssize_t size = src.memview.view.itemsize # <<<<<<<<<<<<<<
31322  *
31323  * for i in range(ndim):
31324  */
31325  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
31326  __pyx_v_size = __pyx_t_1;
31327 
31328  /* "View.MemoryView":1178
31329  * cdef Py_ssize_t size = src.memview.view.itemsize
31330  *
31331  * for i in range(ndim): # <<<<<<<<<<<<<<
31332  * size *= src.shape[i]
31333  *
31334  */
31335  __pyx_t_2 = __pyx_v_ndim;
31336  __pyx_t_3 = __pyx_t_2;
31337  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
31338  __pyx_v_i = __pyx_t_4;
31339 
31340  /* "View.MemoryView":1179
31341  *
31342  * for i in range(ndim):
31343  * size *= src.shape[i] # <<<<<<<<<<<<<<
31344  *
31345  * return size
31346  */
31347  __pyx_v_size = (__pyx_v_size * (__pyx_v_src->shape[__pyx_v_i]));
31348  }
31349 
31350  /* "View.MemoryView":1181
31351  * size *= src.shape[i]
31352  *
31353  * return size # <<<<<<<<<<<<<<
31354  *
31355  * @cname('__pyx_fill_contig_strides_array')
31356  */
31357  __pyx_r = __pyx_v_size;
31358  goto __pyx_L0;
31359 
31360  /* "View.MemoryView":1173
31361  *
31362  * @cname('__pyx_memoryview_slice_get_size')
31363  * cdef Py_ssize_t slice_get_size(__Pyx_memviewslice *src, int ndim) nogil: # <<<<<<<<<<<<<<
31364  * "Return the size of the memory occupied by the slice in number of bytes"
31365  * cdef int i
31366  */
31367 
31368  /* function exit code */
31369  __pyx_L0:;
31370  return __pyx_r;
31371 }
31372 
31373 /* "View.MemoryView":1184
31374  *
31375  * @cname('__pyx_fill_contig_strides_array')
31376  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
31377  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
31378  * int ndim, char order) nogil:
31379  */
31380 
31381 static Py_ssize_t __pyx_fill_contig_strides_array(Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, Py_ssize_t __pyx_v_stride, int __pyx_v_ndim, char __pyx_v_order) {
31382  int __pyx_v_idx;
31383  Py_ssize_t __pyx_r;
31384  int __pyx_t_1;
31385  int __pyx_t_2;
31386  int __pyx_t_3;
31387  int __pyx_t_4;
31388 
31389  /* "View.MemoryView":1193
31390  * cdef int idx
31391  *
31392  * if order == 'F': # <<<<<<<<<<<<<<
31393  * for idx in range(ndim):
31394  * strides[idx] = stride
31395  */
31396  __pyx_t_1 = ((__pyx_v_order == 'F') != 0);
31397  if (__pyx_t_1) {
31398 
31399  /* "View.MemoryView":1194
31400  *
31401  * if order == 'F':
31402  * for idx in range(ndim): # <<<<<<<<<<<<<<
31403  * strides[idx] = stride
31404  * stride = stride * shape[idx]
31405  */
31406  __pyx_t_2 = __pyx_v_ndim;
31407  __pyx_t_3 = __pyx_t_2;
31408  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
31409  __pyx_v_idx = __pyx_t_4;
31410 
31411  /* "View.MemoryView":1195
31412  * if order == 'F':
31413  * for idx in range(ndim):
31414  * strides[idx] = stride # <<<<<<<<<<<<<<
31415  * stride = stride * shape[idx]
31416  * else:
31417  */
31418  (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
31419 
31420  /* "View.MemoryView":1196
31421  * for idx in range(ndim):
31422  * strides[idx] = stride
31423  * stride = stride * shape[idx] # <<<<<<<<<<<<<<
31424  * else:
31425  * for idx in range(ndim - 1, -1, -1):
31426  */
31427  __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
31428  }
31429 
31430  /* "View.MemoryView":1193
31431  * cdef int idx
31432  *
31433  * if order == 'F': # <<<<<<<<<<<<<<
31434  * for idx in range(ndim):
31435  * strides[idx] = stride
31436  */
31437  goto __pyx_L3;
31438  }
31439 
31440  /* "View.MemoryView":1198
31441  * stride = stride * shape[idx]
31442  * else:
31443  * for idx in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
31444  * strides[idx] = stride
31445  * stride = stride * shape[idx]
31446  */
31447  /*else*/ {
31448  for (__pyx_t_2 = (__pyx_v_ndim - 1); __pyx_t_2 > -1; __pyx_t_2-=1) {
31449  __pyx_v_idx = __pyx_t_2;
31450 
31451  /* "View.MemoryView":1199
31452  * else:
31453  * for idx in range(ndim - 1, -1, -1):
31454  * strides[idx] = stride # <<<<<<<<<<<<<<
31455  * stride = stride * shape[idx]
31456  *
31457  */
31458  (__pyx_v_strides[__pyx_v_idx]) = __pyx_v_stride;
31459 
31460  /* "View.MemoryView":1200
31461  * for idx in range(ndim - 1, -1, -1):
31462  * strides[idx] = stride
31463  * stride = stride * shape[idx] # <<<<<<<<<<<<<<
31464  *
31465  * return stride
31466  */
31467  __pyx_v_stride = (__pyx_v_stride * (__pyx_v_shape[__pyx_v_idx]));
31468  }
31469  }
31470  __pyx_L3:;
31471 
31472  /* "View.MemoryView":1202
31473  * stride = stride * shape[idx]
31474  *
31475  * return stride # <<<<<<<<<<<<<<
31476  *
31477  * @cname('__pyx_memoryview_copy_data_to_temp')
31478  */
31479  __pyx_r = __pyx_v_stride;
31480  goto __pyx_L0;
31481 
31482  /* "View.MemoryView":1184
31483  *
31484  * @cname('__pyx_fill_contig_strides_array')
31485  * cdef Py_ssize_t fill_contig_strides_array( # <<<<<<<<<<<<<<
31486  * Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride,
31487  * int ndim, char order) nogil:
31488  */
31489 
31490  /* function exit code */
31491  __pyx_L0:;
31492  return __pyx_r;
31493 }
31494 
31495 /* "View.MemoryView":1205
31496  *
31497  * @cname('__pyx_memoryview_copy_data_to_temp')
31498  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
31499  * __Pyx_memviewslice *tmpslice,
31500  * char order,
31501  */
31502 
31503 static void *__pyx_memoryview_copy_data_to_temp(__Pyx_memviewslice *__pyx_v_src, __Pyx_memviewslice *__pyx_v_tmpslice, char __pyx_v_order, int __pyx_v_ndim) {
31504  int __pyx_v_i;
31505  void *__pyx_v_result;
31506  size_t __pyx_v_itemsize;
31507  size_t __pyx_v_size;
31508  void *__pyx_r;
31509  Py_ssize_t __pyx_t_1;
31510  int __pyx_t_2;
31511  int __pyx_t_3;
31512  struct __pyx_memoryview_obj *__pyx_t_4;
31513  int __pyx_t_5;
31514  int __pyx_t_6;
31515 
31516  /* "View.MemoryView":1216
31517  * cdef void *result
31518  *
31519  * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
31520  * cdef size_t size = slice_get_size(src, ndim)
31521  *
31522  */
31523  __pyx_t_1 = __pyx_v_src->memview->view.itemsize;
31524  __pyx_v_itemsize = __pyx_t_1;
31525 
31526  /* "View.MemoryView":1217
31527  *
31528  * cdef size_t itemsize = src.memview.view.itemsize
31529  * cdef size_t size = slice_get_size(src, ndim) # <<<<<<<<<<<<<<
31530  *
31531  * result = malloc(size)
31532  */
31533  __pyx_v_size = __pyx_memoryview_slice_get_size(__pyx_v_src, __pyx_v_ndim);
31534 
31535  /* "View.MemoryView":1219
31536  * cdef size_t size = slice_get_size(src, ndim)
31537  *
31538  * result = malloc(size) # <<<<<<<<<<<<<<
31539  * if not result:
31540  * _err(MemoryError, NULL)
31541  */
31542  __pyx_v_result = malloc(__pyx_v_size);
31543 
31544  /* "View.MemoryView":1220
31545  *
31546  * result = malloc(size)
31547  * if not result: # <<<<<<<<<<<<<<
31548  * _err(MemoryError, NULL)
31549  *
31550  */
31551  __pyx_t_2 = ((!(__pyx_v_result != 0)) != 0);
31552  if (__pyx_t_2) {
31553 
31554  /* "View.MemoryView":1221
31555  * result = malloc(size)
31556  * if not result:
31557  * _err(MemoryError, NULL) # <<<<<<<<<<<<<<
31558  *
31559  *
31560  */
31561  __pyx_t_3 = __pyx_memoryview_err(__pyx_builtin_MemoryError, NULL); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1221, __pyx_L1_error)
31562 
31563  /* "View.MemoryView":1220
31564  *
31565  * result = malloc(size)
31566  * if not result: # <<<<<<<<<<<<<<
31567  * _err(MemoryError, NULL)
31568  *
31569  */
31570  }
31571 
31572  /* "View.MemoryView":1224
31573  *
31574  *
31575  * tmpslice.data = <char *> result # <<<<<<<<<<<<<<
31576  * tmpslice.memview = src.memview
31577  * for i in range(ndim):
31578  */
31579  __pyx_v_tmpslice->data = ((char *)__pyx_v_result);
31580 
31581  /* "View.MemoryView":1225
31582  *
31583  * tmpslice.data = <char *> result
31584  * tmpslice.memview = src.memview # <<<<<<<<<<<<<<
31585  * for i in range(ndim):
31586  * tmpslice.shape[i] = src.shape[i]
31587  */
31588  __pyx_t_4 = __pyx_v_src->memview;
31589  __pyx_v_tmpslice->memview = __pyx_t_4;
31590 
31591  /* "View.MemoryView":1226
31592  * tmpslice.data = <char *> result
31593  * tmpslice.memview = src.memview
31594  * for i in range(ndim): # <<<<<<<<<<<<<<
31595  * tmpslice.shape[i] = src.shape[i]
31596  * tmpslice.suboffsets[i] = -1
31597  */
31598  __pyx_t_3 = __pyx_v_ndim;
31599  __pyx_t_5 = __pyx_t_3;
31600  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
31601  __pyx_v_i = __pyx_t_6;
31602 
31603  /* "View.MemoryView":1227
31604  * tmpslice.memview = src.memview
31605  * for i in range(ndim):
31606  * tmpslice.shape[i] = src.shape[i] # <<<<<<<<<<<<<<
31607  * tmpslice.suboffsets[i] = -1
31608  *
31609  */
31610  (__pyx_v_tmpslice->shape[__pyx_v_i]) = (__pyx_v_src->shape[__pyx_v_i]);
31611 
31612  /* "View.MemoryView":1228
31613  * for i in range(ndim):
31614  * tmpslice.shape[i] = src.shape[i]
31615  * tmpslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
31616  *
31617  * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize,
31618  */
31619  (__pyx_v_tmpslice->suboffsets[__pyx_v_i]) = -1L;
31620  }
31621 
31622  /* "View.MemoryView":1230
31623  * tmpslice.suboffsets[i] = -1
31624  *
31625  * fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, # <<<<<<<<<<<<<<
31626  * ndim, order)
31627  *
31628  */
31629  (void)(__pyx_fill_contig_strides_array((&(__pyx_v_tmpslice->shape[0])), (&(__pyx_v_tmpslice->strides[0])), __pyx_v_itemsize, __pyx_v_ndim, __pyx_v_order));
31630 
31631  /* "View.MemoryView":1234
31632  *
31633  *
31634  * for i in range(ndim): # <<<<<<<<<<<<<<
31635  * if tmpslice.shape[i] == 1:
31636  * tmpslice.strides[i] = 0
31637  */
31638  __pyx_t_3 = __pyx_v_ndim;
31639  __pyx_t_5 = __pyx_t_3;
31640  for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) {
31641  __pyx_v_i = __pyx_t_6;
31642 
31643  /* "View.MemoryView":1235
31644  *
31645  * for i in range(ndim):
31646  * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
31647  * tmpslice.strides[i] = 0
31648  *
31649  */
31650  __pyx_t_2 = (((__pyx_v_tmpslice->shape[__pyx_v_i]) == 1) != 0);
31651  if (__pyx_t_2) {
31652 
31653  /* "View.MemoryView":1236
31654  * for i in range(ndim):
31655  * if tmpslice.shape[i] == 1:
31656  * tmpslice.strides[i] = 0 # <<<<<<<<<<<<<<
31657  *
31658  * if slice_is_contig(src[0], order, ndim):
31659  */
31660  (__pyx_v_tmpslice->strides[__pyx_v_i]) = 0;
31661 
31662  /* "View.MemoryView":1235
31663  *
31664  * for i in range(ndim):
31665  * if tmpslice.shape[i] == 1: # <<<<<<<<<<<<<<
31666  * tmpslice.strides[i] = 0
31667  *
31668  */
31669  }
31670  }
31671 
31672  /* "View.MemoryView":1238
31673  * tmpslice.strides[i] = 0
31674  *
31675  * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
31676  * memcpy(result, src.data, size)
31677  * else:
31678  */
31679  __pyx_t_2 = (__pyx_memviewslice_is_contig((__pyx_v_src[0]), __pyx_v_order, __pyx_v_ndim) != 0);
31680  if (__pyx_t_2) {
31681 
31682  /* "View.MemoryView":1239
31683  *
31684  * if slice_is_contig(src[0], order, ndim):
31685  * memcpy(result, src.data, size) # <<<<<<<<<<<<<<
31686  * else:
31687  * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
31688  */
31689  (void)(memcpy(__pyx_v_result, __pyx_v_src->data, __pyx_v_size));
31690 
31691  /* "View.MemoryView":1238
31692  * tmpslice.strides[i] = 0
31693  *
31694  * if slice_is_contig(src[0], order, ndim): # <<<<<<<<<<<<<<
31695  * memcpy(result, src.data, size)
31696  * else:
31697  */
31698  goto __pyx_L9;
31699  }
31700 
31701  /* "View.MemoryView":1241
31702  * memcpy(result, src.data, size)
31703  * else:
31704  * copy_strided_to_strided(src, tmpslice, ndim, itemsize) # <<<<<<<<<<<<<<
31705  *
31706  * return result
31707  */
31708  /*else*/ {
31709  copy_strided_to_strided(__pyx_v_src, __pyx_v_tmpslice, __pyx_v_ndim, __pyx_v_itemsize);
31710  }
31711  __pyx_L9:;
31712 
31713  /* "View.MemoryView":1243
31714  * copy_strided_to_strided(src, tmpslice, ndim, itemsize)
31715  *
31716  * return result # <<<<<<<<<<<<<<
31717  *
31718  *
31719  */
31720  __pyx_r = __pyx_v_result;
31721  goto __pyx_L0;
31722 
31723  /* "View.MemoryView":1205
31724  *
31725  * @cname('__pyx_memoryview_copy_data_to_temp')
31726  * cdef void *copy_data_to_temp(__Pyx_memviewslice *src, # <<<<<<<<<<<<<<
31727  * __Pyx_memviewslice *tmpslice,
31728  * char order,
31729  */
31730 
31731  /* function exit code */
31732  __pyx_L1_error:;
31733  {
31734  #ifdef WITH_THREAD
31735  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
31736  #endif
31737  __Pyx_AddTraceback("View.MemoryView.copy_data_to_temp", __pyx_clineno, __pyx_lineno, __pyx_filename);
31738  #ifdef WITH_THREAD
31739  __Pyx_PyGILState_Release(__pyx_gilstate_save);
31740  #endif
31741  }
31742  __pyx_r = NULL;
31743  __pyx_L0:;
31744  return __pyx_r;
31745 }
31746 
31747 /* "View.MemoryView":1248
31748  *
31749  * @cname('__pyx_memoryview_err_extents')
31750  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
31751  * Py_ssize_t extent2) except -1 with gil:
31752  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
31753  */
31754 
31755 static int __pyx_memoryview_err_extents(int __pyx_v_i, Py_ssize_t __pyx_v_extent1, Py_ssize_t __pyx_v_extent2) {
31756  int __pyx_r;
31757  __Pyx_RefNannyDeclarations
31758  PyObject *__pyx_t_1 = NULL;
31759  PyObject *__pyx_t_2 = NULL;
31760  PyObject *__pyx_t_3 = NULL;
31761  PyObject *__pyx_t_4 = NULL;
31762  #ifdef WITH_THREAD
31763  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
31764  #endif
31765  __Pyx_RefNannySetupContext("_err_extents", 0);
31766 
31767  /* "View.MemoryView":1251
31768  * Py_ssize_t extent2) except -1 with gil:
31769  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
31770  * (i, extent1, extent2)) # <<<<<<<<<<<<<<
31771  *
31772  * @cname('__pyx_memoryview_err_dim')
31773  */
31774  __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1251, __pyx_L1_error)
31775  __Pyx_GOTREF(__pyx_t_1);
31776  __pyx_t_2 = PyInt_FromSsize_t(__pyx_v_extent1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1251, __pyx_L1_error)
31777  __Pyx_GOTREF(__pyx_t_2);
31778  __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_extent2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1251, __pyx_L1_error)
31779  __Pyx_GOTREF(__pyx_t_3);
31780  __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1251, __pyx_L1_error)
31781  __Pyx_GOTREF(__pyx_t_4);
31782  __Pyx_GIVEREF(__pyx_t_1);
31783  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
31784  __Pyx_GIVEREF(__pyx_t_2);
31785  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2);
31786  __Pyx_GIVEREF(__pyx_t_3);
31787  PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
31788  __pyx_t_1 = 0;
31789  __pyx_t_2 = 0;
31790  __pyx_t_3 = 0;
31791 
31792  /* "View.MemoryView":1250
31793  * cdef int _err_extents(int i, Py_ssize_t extent1,
31794  * Py_ssize_t extent2) except -1 with gil:
31795  * raise ValueError("got differing extents in dimension %d (got %d and %d)" % # <<<<<<<<<<<<<<
31796  * (i, extent1, extent2))
31797  *
31798  */
31799  __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1250, __pyx_L1_error)
31800  __Pyx_GOTREF(__pyx_t_3);
31801  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31802  __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1250, __pyx_L1_error)
31803  __Pyx_GOTREF(__pyx_t_4);
31804  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31805  __Pyx_Raise(__pyx_t_4, 0, 0, 0);
31806  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31807  __PYX_ERR(0, 1250, __pyx_L1_error)
31808 
31809  /* "View.MemoryView":1248
31810  *
31811  * @cname('__pyx_memoryview_err_extents')
31812  * cdef int _err_extents(int i, Py_ssize_t extent1, # <<<<<<<<<<<<<<
31813  * Py_ssize_t extent2) except -1 with gil:
31814  * raise ValueError("got differing extents in dimension %d (got %d and %d)" %
31815  */
31816 
31817  /* function exit code */
31818  __pyx_L1_error:;
31819  __Pyx_XDECREF(__pyx_t_1);
31820  __Pyx_XDECREF(__pyx_t_2);
31821  __Pyx_XDECREF(__pyx_t_3);
31822  __Pyx_XDECREF(__pyx_t_4);
31823  __Pyx_AddTraceback("View.MemoryView._err_extents", __pyx_clineno, __pyx_lineno, __pyx_filename);
31824  __pyx_r = -1;
31825  __Pyx_RefNannyFinishContext();
31826  #ifdef WITH_THREAD
31827  __Pyx_PyGILState_Release(__pyx_gilstate_save);
31828  #endif
31829  return __pyx_r;
31830 }
31831 
31832 /* "View.MemoryView":1254
31833  *
31834  * @cname('__pyx_memoryview_err_dim')
31835  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
31836  * raise error(msg.decode('ascii') % dim)
31837  *
31838  */
31839 
31840 static int __pyx_memoryview_err_dim(PyObject *__pyx_v_error, char *__pyx_v_msg, int __pyx_v_dim) {
31841  int __pyx_r;
31842  __Pyx_RefNannyDeclarations
31843  PyObject *__pyx_t_1 = NULL;
31844  PyObject *__pyx_t_2 = NULL;
31845  PyObject *__pyx_t_3 = NULL;
31846  PyObject *__pyx_t_4 = NULL;
31847  #ifdef WITH_THREAD
31848  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
31849  #endif
31850  __Pyx_RefNannySetupContext("_err_dim", 0);
31851  __Pyx_INCREF(__pyx_v_error);
31852 
31853  /* "View.MemoryView":1255
31854  * @cname('__pyx_memoryview_err_dim')
31855  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil:
31856  * raise error(msg.decode('ascii') % dim) # <<<<<<<<<<<<<<
31857  *
31858  * @cname('__pyx_memoryview_err')
31859  */
31860  __pyx_t_2 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1255, __pyx_L1_error)
31861  __Pyx_GOTREF(__pyx_t_2);
31862  __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_dim); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1255, __pyx_L1_error)
31863  __Pyx_GOTREF(__pyx_t_3);
31864  __pyx_t_4 = PyUnicode_Format(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error)
31865  __Pyx_GOTREF(__pyx_t_4);
31866  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31867  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31868  __Pyx_INCREF(__pyx_v_error);
31869  __pyx_t_3 = __pyx_v_error; __pyx_t_2 = NULL;
31870  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
31871  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
31872  if (likely(__pyx_t_2)) {
31873  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
31874  __Pyx_INCREF(__pyx_t_2);
31875  __Pyx_INCREF(function);
31876  __Pyx_DECREF_SET(__pyx_t_3, function);
31877  }
31878  }
31879  __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4);
31880  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
31881  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31882  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1255, __pyx_L1_error)
31883  __Pyx_GOTREF(__pyx_t_1);
31884  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31885  __Pyx_Raise(__pyx_t_1, 0, 0, 0);
31886  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
31887  __PYX_ERR(0, 1255, __pyx_L1_error)
31888 
31889  /* "View.MemoryView":1254
31890  *
31891  * @cname('__pyx_memoryview_err_dim')
31892  * cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: # <<<<<<<<<<<<<<
31893  * raise error(msg.decode('ascii') % dim)
31894  *
31895  */
31896 
31897  /* function exit code */
31898  __pyx_L1_error:;
31899  __Pyx_XDECREF(__pyx_t_1);
31900  __Pyx_XDECREF(__pyx_t_2);
31901  __Pyx_XDECREF(__pyx_t_3);
31902  __Pyx_XDECREF(__pyx_t_4);
31903  __Pyx_AddTraceback("View.MemoryView._err_dim", __pyx_clineno, __pyx_lineno, __pyx_filename);
31904  __pyx_r = -1;
31905  __Pyx_XDECREF(__pyx_v_error);
31906  __Pyx_RefNannyFinishContext();
31907  #ifdef WITH_THREAD
31908  __Pyx_PyGILState_Release(__pyx_gilstate_save);
31909  #endif
31910  return __pyx_r;
31911 }
31912 
31913 /* "View.MemoryView":1258
31914  *
31915  * @cname('__pyx_memoryview_err')
31916  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
31917  * if msg != NULL:
31918  * raise error(msg.decode('ascii'))
31919  */
31920 
31921 static int __pyx_memoryview_err(PyObject *__pyx_v_error, char *__pyx_v_msg) {
31922  int __pyx_r;
31923  __Pyx_RefNannyDeclarations
31924  int __pyx_t_1;
31925  PyObject *__pyx_t_2 = NULL;
31926  PyObject *__pyx_t_3 = NULL;
31927  PyObject *__pyx_t_4 = NULL;
31928  PyObject *__pyx_t_5 = NULL;
31929  #ifdef WITH_THREAD
31930  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
31931  #endif
31932  __Pyx_RefNannySetupContext("_err", 0);
31933  __Pyx_INCREF(__pyx_v_error);
31934 
31935  /* "View.MemoryView":1259
31936  * @cname('__pyx_memoryview_err')
31937  * cdef int _err(object error, char *msg) except -1 with gil:
31938  * if msg != NULL: # <<<<<<<<<<<<<<
31939  * raise error(msg.decode('ascii'))
31940  * else:
31941  */
31942  __pyx_t_1 = ((__pyx_v_msg != NULL) != 0);
31943  if (unlikely(__pyx_t_1)) {
31944 
31945  /* "View.MemoryView":1260
31946  * cdef int _err(object error, char *msg) except -1 with gil:
31947  * if msg != NULL:
31948  * raise error(msg.decode('ascii')) # <<<<<<<<<<<<<<
31949  * else:
31950  * raise error
31951  */
31952  __pyx_t_3 = __Pyx_decode_c_string(__pyx_v_msg, 0, strlen(__pyx_v_msg), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1260, __pyx_L1_error)
31953  __Pyx_GOTREF(__pyx_t_3);
31954  __Pyx_INCREF(__pyx_v_error);
31955  __pyx_t_4 = __pyx_v_error; __pyx_t_5 = NULL;
31956  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
31957  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
31958  if (likely(__pyx_t_5)) {
31959  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
31960  __Pyx_INCREF(__pyx_t_5);
31961  __Pyx_INCREF(function);
31962  __Pyx_DECREF_SET(__pyx_t_4, function);
31963  }
31964  }
31965  __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3);
31966  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
31967  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
31968  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1260, __pyx_L1_error)
31969  __Pyx_GOTREF(__pyx_t_2);
31970  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
31971  __Pyx_Raise(__pyx_t_2, 0, 0, 0);
31972  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
31973  __PYX_ERR(0, 1260, __pyx_L1_error)
31974 
31975  /* "View.MemoryView":1259
31976  * @cname('__pyx_memoryview_err')
31977  * cdef int _err(object error, char *msg) except -1 with gil:
31978  * if msg != NULL: # <<<<<<<<<<<<<<
31979  * raise error(msg.decode('ascii'))
31980  * else:
31981  */
31982  }
31983 
31984  /* "View.MemoryView":1262
31985  * raise error(msg.decode('ascii'))
31986  * else:
31987  * raise error # <<<<<<<<<<<<<<
31988  *
31989  * @cname('__pyx_memoryview_copy_contents')
31990  */
31991  /*else*/ {
31992  __Pyx_Raise(__pyx_v_error, 0, 0, 0);
31993  __PYX_ERR(0, 1262, __pyx_L1_error)
31994  }
31995 
31996  /* "View.MemoryView":1258
31997  *
31998  * @cname('__pyx_memoryview_err')
31999  * cdef int _err(object error, char *msg) except -1 with gil: # <<<<<<<<<<<<<<
32000  * if msg != NULL:
32001  * raise error(msg.decode('ascii'))
32002  */
32003 
32004  /* function exit code */
32005  __pyx_L1_error:;
32006  __Pyx_XDECREF(__pyx_t_2);
32007  __Pyx_XDECREF(__pyx_t_3);
32008  __Pyx_XDECREF(__pyx_t_4);
32009  __Pyx_XDECREF(__pyx_t_5);
32010  __Pyx_AddTraceback("View.MemoryView._err", __pyx_clineno, __pyx_lineno, __pyx_filename);
32011  __pyx_r = -1;
32012  __Pyx_XDECREF(__pyx_v_error);
32013  __Pyx_RefNannyFinishContext();
32014  #ifdef WITH_THREAD
32015  __Pyx_PyGILState_Release(__pyx_gilstate_save);
32016  #endif
32017  return __pyx_r;
32018 }
32019 
32020 /* "View.MemoryView":1265
32021  *
32022  * @cname('__pyx_memoryview_copy_contents')
32023  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
32024  * __Pyx_memviewslice dst,
32025  * int src_ndim, int dst_ndim,
32026  */
32027 
32028 static int __pyx_memoryview_copy_contents(__Pyx_memviewslice __pyx_v_src, __Pyx_memviewslice __pyx_v_dst, int __pyx_v_src_ndim, int __pyx_v_dst_ndim, int __pyx_v_dtype_is_object) {
32029  void *__pyx_v_tmpdata;
32030  size_t __pyx_v_itemsize;
32031  int __pyx_v_i;
32032  char __pyx_v_order;
32033  int __pyx_v_broadcasting;
32034  int __pyx_v_direct_copy;
32035  __Pyx_memviewslice __pyx_v_tmp;
32036  int __pyx_v_ndim;
32037  int __pyx_r;
32038  Py_ssize_t __pyx_t_1;
32039  int __pyx_t_2;
32040  int __pyx_t_3;
32041  int __pyx_t_4;
32042  int __pyx_t_5;
32043  int __pyx_t_6;
32044  void *__pyx_t_7;
32045  int __pyx_t_8;
32046 
32047  /* "View.MemoryView":1273
32048  * Check for overlapping memory and verify the shapes.
32049  * """
32050  * cdef void *tmpdata = NULL # <<<<<<<<<<<<<<
32051  * cdef size_t itemsize = src.memview.view.itemsize
32052  * cdef int i
32053  */
32054  __pyx_v_tmpdata = NULL;
32055 
32056  /* "View.MemoryView":1274
32057  * """
32058  * cdef void *tmpdata = NULL
32059  * cdef size_t itemsize = src.memview.view.itemsize # <<<<<<<<<<<<<<
32060  * cdef int i
32061  * cdef char order = get_best_order(&src, src_ndim)
32062  */
32063  __pyx_t_1 = __pyx_v_src.memview->view.itemsize;
32064  __pyx_v_itemsize = __pyx_t_1;
32065 
32066  /* "View.MemoryView":1276
32067  * cdef size_t itemsize = src.memview.view.itemsize
32068  * cdef int i
32069  * cdef char order = get_best_order(&src, src_ndim) # <<<<<<<<<<<<<<
32070  * cdef bint broadcasting = False
32071  * cdef bint direct_copy = False
32072  */
32073  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_src), __pyx_v_src_ndim);
32074 
32075  /* "View.MemoryView":1277
32076  * cdef int i
32077  * cdef char order = get_best_order(&src, src_ndim)
32078  * cdef bint broadcasting = False # <<<<<<<<<<<<<<
32079  * cdef bint direct_copy = False
32080  * cdef __Pyx_memviewslice tmp
32081  */
32082  __pyx_v_broadcasting = 0;
32083 
32084  /* "View.MemoryView":1278
32085  * cdef char order = get_best_order(&src, src_ndim)
32086  * cdef bint broadcasting = False
32087  * cdef bint direct_copy = False # <<<<<<<<<<<<<<
32088  * cdef __Pyx_memviewslice tmp
32089  *
32090  */
32091  __pyx_v_direct_copy = 0;
32092 
32093  /* "View.MemoryView":1281
32094  * cdef __Pyx_memviewslice tmp
32095  *
32096  * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
32097  * broadcast_leading(&src, src_ndim, dst_ndim)
32098  * elif dst_ndim < src_ndim:
32099  */
32100  __pyx_t_2 = ((__pyx_v_src_ndim < __pyx_v_dst_ndim) != 0);
32101  if (__pyx_t_2) {
32102 
32103  /* "View.MemoryView":1282
32104  *
32105  * if src_ndim < dst_ndim:
32106  * broadcast_leading(&src, src_ndim, dst_ndim) # <<<<<<<<<<<<<<
32107  * elif dst_ndim < src_ndim:
32108  * broadcast_leading(&dst, dst_ndim, src_ndim)
32109  */
32110  __pyx_memoryview_broadcast_leading((&__pyx_v_src), __pyx_v_src_ndim, __pyx_v_dst_ndim);
32111 
32112  /* "View.MemoryView":1281
32113  * cdef __Pyx_memviewslice tmp
32114  *
32115  * if src_ndim < dst_ndim: # <<<<<<<<<<<<<<
32116  * broadcast_leading(&src, src_ndim, dst_ndim)
32117  * elif dst_ndim < src_ndim:
32118  */
32119  goto __pyx_L3;
32120  }
32121 
32122  /* "View.MemoryView":1283
32123  * if src_ndim < dst_ndim:
32124  * broadcast_leading(&src, src_ndim, dst_ndim)
32125  * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
32126  * broadcast_leading(&dst, dst_ndim, src_ndim)
32127  *
32128  */
32129  __pyx_t_2 = ((__pyx_v_dst_ndim < __pyx_v_src_ndim) != 0);
32130  if (__pyx_t_2) {
32131 
32132  /* "View.MemoryView":1284
32133  * broadcast_leading(&src, src_ndim, dst_ndim)
32134  * elif dst_ndim < src_ndim:
32135  * broadcast_leading(&dst, dst_ndim, src_ndim) # <<<<<<<<<<<<<<
32136  *
32137  * cdef int ndim = max(src_ndim, dst_ndim)
32138  */
32139  __pyx_memoryview_broadcast_leading((&__pyx_v_dst), __pyx_v_dst_ndim, __pyx_v_src_ndim);
32140 
32141  /* "View.MemoryView":1283
32142  * if src_ndim < dst_ndim:
32143  * broadcast_leading(&src, src_ndim, dst_ndim)
32144  * elif dst_ndim < src_ndim: # <<<<<<<<<<<<<<
32145  * broadcast_leading(&dst, dst_ndim, src_ndim)
32146  *
32147  */
32148  }
32149  __pyx_L3:;
32150 
32151  /* "View.MemoryView":1286
32152  * broadcast_leading(&dst, dst_ndim, src_ndim)
32153  *
32154  * cdef int ndim = max(src_ndim, dst_ndim) # <<<<<<<<<<<<<<
32155  *
32156  * for i in range(ndim):
32157  */
32158  __pyx_t_3 = __pyx_v_dst_ndim;
32159  __pyx_t_4 = __pyx_v_src_ndim;
32160  if (((__pyx_t_3 > __pyx_t_4) != 0)) {
32161  __pyx_t_5 = __pyx_t_3;
32162  } else {
32163  __pyx_t_5 = __pyx_t_4;
32164  }
32165  __pyx_v_ndim = __pyx_t_5;
32166 
32167  /* "View.MemoryView":1288
32168  * cdef int ndim = max(src_ndim, dst_ndim)
32169  *
32170  * for i in range(ndim): # <<<<<<<<<<<<<<
32171  * if src.shape[i] != dst.shape[i]:
32172  * if src.shape[i] == 1:
32173  */
32174  __pyx_t_5 = __pyx_v_ndim;
32175  __pyx_t_3 = __pyx_t_5;
32176  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
32177  __pyx_v_i = __pyx_t_4;
32178 
32179  /* "View.MemoryView":1289
32180  *
32181  * for i in range(ndim):
32182  * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
32183  * if src.shape[i] == 1:
32184  * broadcasting = True
32185  */
32186  __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) != (__pyx_v_dst.shape[__pyx_v_i])) != 0);
32187  if (__pyx_t_2) {
32188 
32189  /* "View.MemoryView":1290
32190  * for i in range(ndim):
32191  * if src.shape[i] != dst.shape[i]:
32192  * if src.shape[i] == 1: # <<<<<<<<<<<<<<
32193  * broadcasting = True
32194  * src.strides[i] = 0
32195  */
32196  __pyx_t_2 = (((__pyx_v_src.shape[__pyx_v_i]) == 1) != 0);
32197  if (__pyx_t_2) {
32198 
32199  /* "View.MemoryView":1291
32200  * if src.shape[i] != dst.shape[i]:
32201  * if src.shape[i] == 1:
32202  * broadcasting = True # <<<<<<<<<<<<<<
32203  * src.strides[i] = 0
32204  * else:
32205  */
32206  __pyx_v_broadcasting = 1;
32207 
32208  /* "View.MemoryView":1292
32209  * if src.shape[i] == 1:
32210  * broadcasting = True
32211  * src.strides[i] = 0 # <<<<<<<<<<<<<<
32212  * else:
32213  * _err_extents(i, dst.shape[i], src.shape[i])
32214  */
32215  (__pyx_v_src.strides[__pyx_v_i]) = 0;
32216 
32217  /* "View.MemoryView":1290
32218  * for i in range(ndim):
32219  * if src.shape[i] != dst.shape[i]:
32220  * if src.shape[i] == 1: # <<<<<<<<<<<<<<
32221  * broadcasting = True
32222  * src.strides[i] = 0
32223  */
32224  goto __pyx_L7;
32225  }
32226 
32227  /* "View.MemoryView":1294
32228  * src.strides[i] = 0
32229  * else:
32230  * _err_extents(i, dst.shape[i], src.shape[i]) # <<<<<<<<<<<<<<
32231  *
32232  * if src.suboffsets[i] >= 0:
32233  */
32234  /*else*/ {
32235  __pyx_t_6 = __pyx_memoryview_err_extents(__pyx_v_i, (__pyx_v_dst.shape[__pyx_v_i]), (__pyx_v_src.shape[__pyx_v_i])); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1294, __pyx_L1_error)
32236  }
32237  __pyx_L7:;
32238 
32239  /* "View.MemoryView":1289
32240  *
32241  * for i in range(ndim):
32242  * if src.shape[i] != dst.shape[i]: # <<<<<<<<<<<<<<
32243  * if src.shape[i] == 1:
32244  * broadcasting = True
32245  */
32246  }
32247 
32248  /* "View.MemoryView":1296
32249  * _err_extents(i, dst.shape[i], src.shape[i])
32250  *
32251  * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
32252  * _err_dim(ValueError, "Dimension %d is not direct", i)
32253  *
32254  */
32255  __pyx_t_2 = (((__pyx_v_src.suboffsets[__pyx_v_i]) >= 0) != 0);
32256  if (__pyx_t_2) {
32257 
32258  /* "View.MemoryView":1297
32259  *
32260  * if src.suboffsets[i] >= 0:
32261  * _err_dim(ValueError, "Dimension %d is not direct", i) # <<<<<<<<<<<<<<
32262  *
32263  * if slices_overlap(&src, &dst, ndim, itemsize):
32264  */
32265  __pyx_t_6 = __pyx_memoryview_err_dim(__pyx_builtin_ValueError, ((char *)"Dimension %d is not direct"), __pyx_v_i); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1297, __pyx_L1_error)
32266 
32267  /* "View.MemoryView":1296
32268  * _err_extents(i, dst.shape[i], src.shape[i])
32269  *
32270  * if src.suboffsets[i] >= 0: # <<<<<<<<<<<<<<
32271  * _err_dim(ValueError, "Dimension %d is not direct", i)
32272  *
32273  */
32274  }
32275  }
32276 
32277  /* "View.MemoryView":1299
32278  * _err_dim(ValueError, "Dimension %d is not direct", i)
32279  *
32280  * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
32281  *
32282  * if not slice_is_contig(src, order, ndim):
32283  */
32284  __pyx_t_2 = (__pyx_slices_overlap((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize) != 0);
32285  if (__pyx_t_2) {
32286 
32287  /* "View.MemoryView":1301
32288  * if slices_overlap(&src, &dst, ndim, itemsize):
32289  *
32290  * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
32291  * order = get_best_order(&dst, ndim)
32292  *
32293  */
32294  __pyx_t_2 = ((!(__pyx_memviewslice_is_contig(__pyx_v_src, __pyx_v_order, __pyx_v_ndim) != 0)) != 0);
32295  if (__pyx_t_2) {
32296 
32297  /* "View.MemoryView":1302
32298  *
32299  * if not slice_is_contig(src, order, ndim):
32300  * order = get_best_order(&dst, ndim) # <<<<<<<<<<<<<<
32301  *
32302  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
32303  */
32304  __pyx_v_order = __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim);
32305 
32306  /* "View.MemoryView":1301
32307  * if slices_overlap(&src, &dst, ndim, itemsize):
32308  *
32309  * if not slice_is_contig(src, order, ndim): # <<<<<<<<<<<<<<
32310  * order = get_best_order(&dst, ndim)
32311  *
32312  */
32313  }
32314 
32315  /* "View.MemoryView":1304
32316  * order = get_best_order(&dst, ndim)
32317  *
32318  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) # <<<<<<<<<<<<<<
32319  * src = tmp
32320  *
32321  */
32322  __pyx_t_7 = __pyx_memoryview_copy_data_to_temp((&__pyx_v_src), (&__pyx_v_tmp), __pyx_v_order, __pyx_v_ndim); if (unlikely(__pyx_t_7 == ((void *)NULL))) __PYX_ERR(0, 1304, __pyx_L1_error)
32323  __pyx_v_tmpdata = __pyx_t_7;
32324 
32325  /* "View.MemoryView":1305
32326  *
32327  * tmpdata = copy_data_to_temp(&src, &tmp, order, ndim)
32328  * src = tmp # <<<<<<<<<<<<<<
32329  *
32330  * if not broadcasting:
32331  */
32332  __pyx_v_src = __pyx_v_tmp;
32333 
32334  /* "View.MemoryView":1299
32335  * _err_dim(ValueError, "Dimension %d is not direct", i)
32336  *
32337  * if slices_overlap(&src, &dst, ndim, itemsize): # <<<<<<<<<<<<<<
32338  *
32339  * if not slice_is_contig(src, order, ndim):
32340  */
32341  }
32342 
32343  /* "View.MemoryView":1307
32344  * src = tmp
32345  *
32346  * if not broadcasting: # <<<<<<<<<<<<<<
32347  *
32348  *
32349  */
32350  __pyx_t_2 = ((!(__pyx_v_broadcasting != 0)) != 0);
32351  if (__pyx_t_2) {
32352 
32353  /* "View.MemoryView":1310
32354  *
32355  *
32356  * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
32357  * direct_copy = slice_is_contig(dst, 'C', ndim)
32358  * elif slice_is_contig(src, 'F', ndim):
32359  */
32360  __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'C', __pyx_v_ndim) != 0);
32361  if (__pyx_t_2) {
32362 
32363  /* "View.MemoryView":1311
32364  *
32365  * if slice_is_contig(src, 'C', ndim):
32366  * direct_copy = slice_is_contig(dst, 'C', ndim) # <<<<<<<<<<<<<<
32367  * elif slice_is_contig(src, 'F', ndim):
32368  * direct_copy = slice_is_contig(dst, 'F', ndim)
32369  */
32370  __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'C', __pyx_v_ndim);
32371 
32372  /* "View.MemoryView":1310
32373  *
32374  *
32375  * if slice_is_contig(src, 'C', ndim): # <<<<<<<<<<<<<<
32376  * direct_copy = slice_is_contig(dst, 'C', ndim)
32377  * elif slice_is_contig(src, 'F', ndim):
32378  */
32379  goto __pyx_L12;
32380  }
32381 
32382  /* "View.MemoryView":1312
32383  * if slice_is_contig(src, 'C', ndim):
32384  * direct_copy = slice_is_contig(dst, 'C', ndim)
32385  * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
32386  * direct_copy = slice_is_contig(dst, 'F', ndim)
32387  *
32388  */
32389  __pyx_t_2 = (__pyx_memviewslice_is_contig(__pyx_v_src, 'F', __pyx_v_ndim) != 0);
32390  if (__pyx_t_2) {
32391 
32392  /* "View.MemoryView":1313
32393  * direct_copy = slice_is_contig(dst, 'C', ndim)
32394  * elif slice_is_contig(src, 'F', ndim):
32395  * direct_copy = slice_is_contig(dst, 'F', ndim) # <<<<<<<<<<<<<<
32396  *
32397  * if direct_copy:
32398  */
32399  __pyx_v_direct_copy = __pyx_memviewslice_is_contig(__pyx_v_dst, 'F', __pyx_v_ndim);
32400 
32401  /* "View.MemoryView":1312
32402  * if slice_is_contig(src, 'C', ndim):
32403  * direct_copy = slice_is_contig(dst, 'C', ndim)
32404  * elif slice_is_contig(src, 'F', ndim): # <<<<<<<<<<<<<<
32405  * direct_copy = slice_is_contig(dst, 'F', ndim)
32406  *
32407  */
32408  }
32409  __pyx_L12:;
32410 
32411  /* "View.MemoryView":1315
32412  * direct_copy = slice_is_contig(dst, 'F', ndim)
32413  *
32414  * if direct_copy: # <<<<<<<<<<<<<<
32415  *
32416  * refcount_copying(&dst, dtype_is_object, ndim, False)
32417  */
32418  __pyx_t_2 = (__pyx_v_direct_copy != 0);
32419  if (__pyx_t_2) {
32420 
32421  /* "View.MemoryView":1317
32422  * if direct_copy:
32423  *
32424  * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
32425  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
32426  * refcount_copying(&dst, dtype_is_object, ndim, True)
32427  */
32428  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
32429 
32430  /* "View.MemoryView":1318
32431  *
32432  * refcount_copying(&dst, dtype_is_object, ndim, False)
32433  * memcpy(dst.data, src.data, slice_get_size(&src, ndim)) # <<<<<<<<<<<<<<
32434  * refcount_copying(&dst, dtype_is_object, ndim, True)
32435  * free(tmpdata)
32436  */
32437  (void)(memcpy(__pyx_v_dst.data, __pyx_v_src.data, __pyx_memoryview_slice_get_size((&__pyx_v_src), __pyx_v_ndim)));
32438 
32439  /* "View.MemoryView":1319
32440  * refcount_copying(&dst, dtype_is_object, ndim, False)
32441  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
32442  * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
32443  * free(tmpdata)
32444  * return 0
32445  */
32446  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
32447 
32448  /* "View.MemoryView":1320
32449  * memcpy(dst.data, src.data, slice_get_size(&src, ndim))
32450  * refcount_copying(&dst, dtype_is_object, ndim, True)
32451  * free(tmpdata) # <<<<<<<<<<<<<<
32452  * return 0
32453  *
32454  */
32455  free(__pyx_v_tmpdata);
32456 
32457  /* "View.MemoryView":1321
32458  * refcount_copying(&dst, dtype_is_object, ndim, True)
32459  * free(tmpdata)
32460  * return 0 # <<<<<<<<<<<<<<
32461  *
32462  * if order == 'F' == get_best_order(&dst, ndim):
32463  */
32464  __pyx_r = 0;
32465  goto __pyx_L0;
32466 
32467  /* "View.MemoryView":1315
32468  * direct_copy = slice_is_contig(dst, 'F', ndim)
32469  *
32470  * if direct_copy: # <<<<<<<<<<<<<<
32471  *
32472  * refcount_copying(&dst, dtype_is_object, ndim, False)
32473  */
32474  }
32475 
32476  /* "View.MemoryView":1307
32477  * src = tmp
32478  *
32479  * if not broadcasting: # <<<<<<<<<<<<<<
32480  *
32481  *
32482  */
32483  }
32484 
32485  /* "View.MemoryView":1323
32486  * return 0
32487  *
32488  * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
32489  *
32490  *
32491  */
32492  __pyx_t_2 = (__pyx_v_order == 'F');
32493  if (__pyx_t_2) {
32494  __pyx_t_2 = ('F' == __pyx_get_best_slice_order((&__pyx_v_dst), __pyx_v_ndim));
32495  }
32496  __pyx_t_8 = (__pyx_t_2 != 0);
32497  if (__pyx_t_8) {
32498 
32499  /* "View.MemoryView":1326
32500  *
32501  *
32502  * transpose_memslice(&src) # <<<<<<<<<<<<<<
32503  * transpose_memslice(&dst)
32504  *
32505  */
32506  __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_src)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(0, 1326, __pyx_L1_error)
32507 
32508  /* "View.MemoryView":1327
32509  *
32510  * transpose_memslice(&src)
32511  * transpose_memslice(&dst) # <<<<<<<<<<<<<<
32512  *
32513  * refcount_copying(&dst, dtype_is_object, ndim, False)
32514  */
32515  __pyx_t_5 = __pyx_memslice_transpose((&__pyx_v_dst)); if (unlikely(__pyx_t_5 == ((int)0))) __PYX_ERR(0, 1327, __pyx_L1_error)
32516 
32517  /* "View.MemoryView":1323
32518  * return 0
32519  *
32520  * if order == 'F' == get_best_order(&dst, ndim): # <<<<<<<<<<<<<<
32521  *
32522  *
32523  */
32524  }
32525 
32526  /* "View.MemoryView":1329
32527  * transpose_memslice(&dst)
32528  *
32529  * refcount_copying(&dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
32530  * copy_strided_to_strided(&src, &dst, ndim, itemsize)
32531  * refcount_copying(&dst, dtype_is_object, ndim, True)
32532  */
32533  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
32534 
32535  /* "View.MemoryView":1330
32536  *
32537  * refcount_copying(&dst, dtype_is_object, ndim, False)
32538  * copy_strided_to_strided(&src, &dst, ndim, itemsize) # <<<<<<<<<<<<<<
32539  * refcount_copying(&dst, dtype_is_object, ndim, True)
32540  *
32541  */
32542  copy_strided_to_strided((&__pyx_v_src), (&__pyx_v_dst), __pyx_v_ndim, __pyx_v_itemsize);
32543 
32544  /* "View.MemoryView":1331
32545  * refcount_copying(&dst, dtype_is_object, ndim, False)
32546  * copy_strided_to_strided(&src, &dst, ndim, itemsize)
32547  * refcount_copying(&dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
32548  *
32549  * free(tmpdata)
32550  */
32551  __pyx_memoryview_refcount_copying((&__pyx_v_dst), __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
32552 
32553  /* "View.MemoryView":1333
32554  * refcount_copying(&dst, dtype_is_object, ndim, True)
32555  *
32556  * free(tmpdata) # <<<<<<<<<<<<<<
32557  * return 0
32558  *
32559  */
32560  free(__pyx_v_tmpdata);
32561 
32562  /* "View.MemoryView":1334
32563  *
32564  * free(tmpdata)
32565  * return 0 # <<<<<<<<<<<<<<
32566  *
32567  * @cname('__pyx_memoryview_broadcast_leading')
32568  */
32569  __pyx_r = 0;
32570  goto __pyx_L0;
32571 
32572  /* "View.MemoryView":1265
32573  *
32574  * @cname('__pyx_memoryview_copy_contents')
32575  * cdef int memoryview_copy_contents(__Pyx_memviewslice src, # <<<<<<<<<<<<<<
32576  * __Pyx_memviewslice dst,
32577  * int src_ndim, int dst_ndim,
32578  */
32579 
32580  /* function exit code */
32581  __pyx_L1_error:;
32582  {
32583  #ifdef WITH_THREAD
32584  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
32585  #endif
32586  __Pyx_AddTraceback("View.MemoryView.memoryview_copy_contents", __pyx_clineno, __pyx_lineno, __pyx_filename);
32587  #ifdef WITH_THREAD
32588  __Pyx_PyGILState_Release(__pyx_gilstate_save);
32589  #endif
32590  }
32591  __pyx_r = -1;
32592  __pyx_L0:;
32593  return __pyx_r;
32594 }
32595 
32596 /* "View.MemoryView":1337
32597  *
32598  * @cname('__pyx_memoryview_broadcast_leading')
32599  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
32600  * int ndim,
32601  * int ndim_other) nogil:
32602  */
32603 
32604 static void __pyx_memoryview_broadcast_leading(__Pyx_memviewslice *__pyx_v_mslice, int __pyx_v_ndim, int __pyx_v_ndim_other) {
32605  int __pyx_v_i;
32606  int __pyx_v_offset;
32607  int __pyx_t_1;
32608  int __pyx_t_2;
32609  int __pyx_t_3;
32610 
32611  /* "View.MemoryView":1341
32612  * int ndim_other) nogil:
32613  * cdef int i
32614  * cdef int offset = ndim_other - ndim # <<<<<<<<<<<<<<
32615  *
32616  * for i in range(ndim - 1, -1, -1):
32617  */
32618  __pyx_v_offset = (__pyx_v_ndim_other - __pyx_v_ndim);
32619 
32620  /* "View.MemoryView":1343
32621  * cdef int offset = ndim_other - ndim
32622  *
32623  * for i in range(ndim - 1, -1, -1): # <<<<<<<<<<<<<<
32624  * mslice.shape[i + offset] = mslice.shape[i]
32625  * mslice.strides[i + offset] = mslice.strides[i]
32626  */
32627  for (__pyx_t_1 = (__pyx_v_ndim - 1); __pyx_t_1 > -1; __pyx_t_1-=1) {
32628  __pyx_v_i = __pyx_t_1;
32629 
32630  /* "View.MemoryView":1344
32631  *
32632  * for i in range(ndim - 1, -1, -1):
32633  * mslice.shape[i + offset] = mslice.shape[i] # <<<<<<<<<<<<<<
32634  * mslice.strides[i + offset] = mslice.strides[i]
32635  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
32636  */
32637  (__pyx_v_mslice->shape[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->shape[__pyx_v_i]);
32638 
32639  /* "View.MemoryView":1345
32640  * for i in range(ndim - 1, -1, -1):
32641  * mslice.shape[i + offset] = mslice.shape[i]
32642  * mslice.strides[i + offset] = mslice.strides[i] # <<<<<<<<<<<<<<
32643  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
32644  *
32645  */
32646  (__pyx_v_mslice->strides[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->strides[__pyx_v_i]);
32647 
32648  /* "View.MemoryView":1346
32649  * mslice.shape[i + offset] = mslice.shape[i]
32650  * mslice.strides[i + offset] = mslice.strides[i]
32651  * mslice.suboffsets[i + offset] = mslice.suboffsets[i] # <<<<<<<<<<<<<<
32652  *
32653  * for i in range(offset):
32654  */
32655  (__pyx_v_mslice->suboffsets[(__pyx_v_i + __pyx_v_offset)]) = (__pyx_v_mslice->suboffsets[__pyx_v_i]);
32656  }
32657 
32658  /* "View.MemoryView":1348
32659  * mslice.suboffsets[i + offset] = mslice.suboffsets[i]
32660  *
32661  * for i in range(offset): # <<<<<<<<<<<<<<
32662  * mslice.shape[i] = 1
32663  * mslice.strides[i] = mslice.strides[0]
32664  */
32665  __pyx_t_1 = __pyx_v_offset;
32666  __pyx_t_2 = __pyx_t_1;
32667  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
32668  __pyx_v_i = __pyx_t_3;
32669 
32670  /* "View.MemoryView":1349
32671  *
32672  * for i in range(offset):
32673  * mslice.shape[i] = 1 # <<<<<<<<<<<<<<
32674  * mslice.strides[i] = mslice.strides[0]
32675  * mslice.suboffsets[i] = -1
32676  */
32677  (__pyx_v_mslice->shape[__pyx_v_i]) = 1;
32678 
32679  /* "View.MemoryView":1350
32680  * for i in range(offset):
32681  * mslice.shape[i] = 1
32682  * mslice.strides[i] = mslice.strides[0] # <<<<<<<<<<<<<<
32683  * mslice.suboffsets[i] = -1
32684  *
32685  */
32686  (__pyx_v_mslice->strides[__pyx_v_i]) = (__pyx_v_mslice->strides[0]);
32687 
32688  /* "View.MemoryView":1351
32689  * mslice.shape[i] = 1
32690  * mslice.strides[i] = mslice.strides[0]
32691  * mslice.suboffsets[i] = -1 # <<<<<<<<<<<<<<
32692  *
32693  *
32694  */
32695  (__pyx_v_mslice->suboffsets[__pyx_v_i]) = -1L;
32696  }
32697 
32698  /* "View.MemoryView":1337
32699  *
32700  * @cname('__pyx_memoryview_broadcast_leading')
32701  * cdef void broadcast_leading(__Pyx_memviewslice *mslice, # <<<<<<<<<<<<<<
32702  * int ndim,
32703  * int ndim_other) nogil:
32704  */
32705 
32706  /* function exit code */
32707 }
32708 
32709 /* "View.MemoryView":1359
32710  *
32711  * @cname('__pyx_memoryview_refcount_copying')
32712  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
32713  * int ndim, bint inc) nogil:
32714  *
32715  */
32716 
32717 static void __pyx_memoryview_refcount_copying(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_dtype_is_object, int __pyx_v_ndim, int __pyx_v_inc) {
32718  int __pyx_t_1;
32719 
32720  /* "View.MemoryView":1363
32721  *
32722  *
32723  * if dtype_is_object: # <<<<<<<<<<<<<<
32724  * refcount_objects_in_slice_with_gil(dst.data, dst.shape,
32725  * dst.strides, ndim, inc)
32726  */
32727  __pyx_t_1 = (__pyx_v_dtype_is_object != 0);
32728  if (__pyx_t_1) {
32729 
32730  /* "View.MemoryView":1364
32731  *
32732  * if dtype_is_object:
32733  * refcount_objects_in_slice_with_gil(dst.data, dst.shape, # <<<<<<<<<<<<<<
32734  * dst.strides, ndim, inc)
32735  *
32736  */
32737  __pyx_memoryview_refcount_objects_in_slice_with_gil(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_inc);
32738 
32739  /* "View.MemoryView":1363
32740  *
32741  *
32742  * if dtype_is_object: # <<<<<<<<<<<<<<
32743  * refcount_objects_in_slice_with_gil(dst.data, dst.shape,
32744  * dst.strides, ndim, inc)
32745  */
32746  }
32747 
32748  /* "View.MemoryView":1359
32749  *
32750  * @cname('__pyx_memoryview_refcount_copying')
32751  * cdef void refcount_copying(__Pyx_memviewslice *dst, bint dtype_is_object, # <<<<<<<<<<<<<<
32752  * int ndim, bint inc) nogil:
32753  *
32754  */
32755 
32756  /* function exit code */
32757 }
32758 
32759 /* "View.MemoryView":1368
32760  *
32761  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
32762  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
32763  * Py_ssize_t *strides, int ndim,
32764  * bint inc) with gil:
32765  */
32766 
32767 static void __pyx_memoryview_refcount_objects_in_slice_with_gil(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
32768  __Pyx_RefNannyDeclarations
32769  #ifdef WITH_THREAD
32770  PyGILState_STATE __pyx_gilstate_save = __Pyx_PyGILState_Ensure();
32771  #endif
32772  __Pyx_RefNannySetupContext("refcount_objects_in_slice_with_gil", 0);
32773 
32774  /* "View.MemoryView":1371
32775  * Py_ssize_t *strides, int ndim,
32776  * bint inc) with gil:
32777  * refcount_objects_in_slice(data, shape, strides, ndim, inc) # <<<<<<<<<<<<<<
32778  *
32779  * @cname('__pyx_memoryview_refcount_objects_in_slice')
32780  */
32781  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, __pyx_v_shape, __pyx_v_strides, __pyx_v_ndim, __pyx_v_inc);
32782 
32783  /* "View.MemoryView":1368
32784  *
32785  * @cname('__pyx_memoryview_refcount_objects_in_slice_with_gil')
32786  * cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
32787  * Py_ssize_t *strides, int ndim,
32788  * bint inc) with gil:
32789  */
32790 
32791  /* function exit code */
32792  __Pyx_RefNannyFinishContext();
32793  #ifdef WITH_THREAD
32794  __Pyx_PyGILState_Release(__pyx_gilstate_save);
32795  #endif
32796 }
32797 
32798 /* "View.MemoryView":1374
32799  *
32800  * @cname('__pyx_memoryview_refcount_objects_in_slice')
32801  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
32802  * Py_ssize_t *strides, int ndim, bint inc):
32803  * cdef Py_ssize_t i
32804  */
32805 
32806 static void __pyx_memoryview_refcount_objects_in_slice(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, int __pyx_v_inc) {
32807  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
32808  __Pyx_RefNannyDeclarations
32809  Py_ssize_t __pyx_t_1;
32810  Py_ssize_t __pyx_t_2;
32811  Py_ssize_t __pyx_t_3;
32812  int __pyx_t_4;
32813  __Pyx_RefNannySetupContext("refcount_objects_in_slice", 0);
32814 
32815  /* "View.MemoryView":1378
32816  * cdef Py_ssize_t i
32817  *
32818  * for i in range(shape[0]): # <<<<<<<<<<<<<<
32819  * if ndim == 1:
32820  * if inc:
32821  */
32822  __pyx_t_1 = (__pyx_v_shape[0]);
32823  __pyx_t_2 = __pyx_t_1;
32824  for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) {
32825  __pyx_v_i = __pyx_t_3;
32826 
32827  /* "View.MemoryView":1379
32828  *
32829  * for i in range(shape[0]):
32830  * if ndim == 1: # <<<<<<<<<<<<<<
32831  * if inc:
32832  * Py_INCREF((<PyObject **> data)[0])
32833  */
32834  __pyx_t_4 = ((__pyx_v_ndim == 1) != 0);
32835  if (__pyx_t_4) {
32836 
32837  /* "View.MemoryView":1380
32838  * for i in range(shape[0]):
32839  * if ndim == 1:
32840  * if inc: # <<<<<<<<<<<<<<
32841  * Py_INCREF((<PyObject **> data)[0])
32842  * else:
32843  */
32844  __pyx_t_4 = (__pyx_v_inc != 0);
32845  if (__pyx_t_4) {
32846 
32847  /* "View.MemoryView":1381
32848  * if ndim == 1:
32849  * if inc:
32850  * Py_INCREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
32851  * else:
32852  * Py_DECREF((<PyObject **> data)[0])
32853  */
32854  Py_INCREF((((PyObject **)__pyx_v_data)[0]));
32855 
32856  /* "View.MemoryView":1380
32857  * for i in range(shape[0]):
32858  * if ndim == 1:
32859  * if inc: # <<<<<<<<<<<<<<
32860  * Py_INCREF((<PyObject **> data)[0])
32861  * else:
32862  */
32863  goto __pyx_L6;
32864  }
32865 
32866  /* "View.MemoryView":1383
32867  * Py_INCREF((<PyObject **> data)[0])
32868  * else:
32869  * Py_DECREF((<PyObject **> data)[0]) # <<<<<<<<<<<<<<
32870  * else:
32871  * refcount_objects_in_slice(data, shape + 1, strides + 1,
32872  */
32873  /*else*/ {
32874  Py_DECREF((((PyObject **)__pyx_v_data)[0]));
32875  }
32876  __pyx_L6:;
32877 
32878  /* "View.MemoryView":1379
32879  *
32880  * for i in range(shape[0]):
32881  * if ndim == 1: # <<<<<<<<<<<<<<
32882  * if inc:
32883  * Py_INCREF((<PyObject **> data)[0])
32884  */
32885  goto __pyx_L5;
32886  }
32887 
32888  /* "View.MemoryView":1385
32889  * Py_DECREF((<PyObject **> data)[0])
32890  * else:
32891  * refcount_objects_in_slice(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
32892  * ndim - 1, inc)
32893  *
32894  */
32895  /*else*/ {
32896 
32897  /* "View.MemoryView":1386
32898  * else:
32899  * refcount_objects_in_slice(data, shape + 1, strides + 1,
32900  * ndim - 1, inc) # <<<<<<<<<<<<<<
32901  *
32902  * data += strides[0]
32903  */
32904  __pyx_memoryview_refcount_objects_in_slice(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_inc);
32905  }
32906  __pyx_L5:;
32907 
32908  /* "View.MemoryView":1388
32909  * ndim - 1, inc)
32910  *
32911  * data += strides[0] # <<<<<<<<<<<<<<
32912  *
32913  *
32914  */
32915  __pyx_v_data = (__pyx_v_data + (__pyx_v_strides[0]));
32916  }
32917 
32918  /* "View.MemoryView":1374
32919  *
32920  * @cname('__pyx_memoryview_refcount_objects_in_slice')
32921  * cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
32922  * Py_ssize_t *strides, int ndim, bint inc):
32923  * cdef Py_ssize_t i
32924  */
32925 
32926  /* function exit code */
32927  __Pyx_RefNannyFinishContext();
32928 }
32929 
32930 /* "View.MemoryView":1394
32931  *
32932  * @cname('__pyx_memoryview_slice_assign_scalar')
32933  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
32934  * size_t itemsize, void *item,
32935  * bint dtype_is_object) nogil:
32936  */
32937 
32938 static void __pyx_memoryview_slice_assign_scalar(__Pyx_memviewslice *__pyx_v_dst, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item, int __pyx_v_dtype_is_object) {
32939 
32940  /* "View.MemoryView":1397
32941  * size_t itemsize, void *item,
32942  * bint dtype_is_object) nogil:
32943  * refcount_copying(dst, dtype_is_object, ndim, False) # <<<<<<<<<<<<<<
32944  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
32945  * itemsize, item)
32946  */
32947  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 0);
32948 
32949  /* "View.MemoryView":1398
32950  * bint dtype_is_object) nogil:
32951  * refcount_copying(dst, dtype_is_object, ndim, False)
32952  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, # <<<<<<<<<<<<<<
32953  * itemsize, item)
32954  * refcount_copying(dst, dtype_is_object, ndim, True)
32955  */
32956  __pyx_memoryview__slice_assign_scalar(__pyx_v_dst->data, __pyx_v_dst->shape, __pyx_v_dst->strides, __pyx_v_ndim, __pyx_v_itemsize, __pyx_v_item);
32957 
32958  /* "View.MemoryView":1400
32959  * _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim,
32960  * itemsize, item)
32961  * refcount_copying(dst, dtype_is_object, ndim, True) # <<<<<<<<<<<<<<
32962  *
32963  *
32964  */
32965  __pyx_memoryview_refcount_copying(__pyx_v_dst, __pyx_v_dtype_is_object, __pyx_v_ndim, 1);
32966 
32967  /* "View.MemoryView":1394
32968  *
32969  * @cname('__pyx_memoryview_slice_assign_scalar')
32970  * cdef void slice_assign_scalar(__Pyx_memviewslice *dst, int ndim, # <<<<<<<<<<<<<<
32971  * size_t itemsize, void *item,
32972  * bint dtype_is_object) nogil:
32973  */
32974 
32975  /* function exit code */
32976 }
32977 
32978 /* "View.MemoryView":1404
32979  *
32980  * @cname('__pyx_memoryview__slice_assign_scalar')
32981  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
32982  * Py_ssize_t *strides, int ndim,
32983  * size_t itemsize, void *item) nogil:
32984  */
32985 
32986 static void __pyx_memoryview__slice_assign_scalar(char *__pyx_v_data, Py_ssize_t *__pyx_v_shape, Py_ssize_t *__pyx_v_strides, int __pyx_v_ndim, size_t __pyx_v_itemsize, void *__pyx_v_item) {
32987  CYTHON_UNUSED Py_ssize_t __pyx_v_i;
32988  Py_ssize_t __pyx_v_stride;
32989  Py_ssize_t __pyx_v_extent;
32990  int __pyx_t_1;
32991  Py_ssize_t __pyx_t_2;
32992  Py_ssize_t __pyx_t_3;
32993  Py_ssize_t __pyx_t_4;
32994 
32995  /* "View.MemoryView":1408
32996  * size_t itemsize, void *item) nogil:
32997  * cdef Py_ssize_t i
32998  * cdef Py_ssize_t stride = strides[0] # <<<<<<<<<<<<<<
32999  * cdef Py_ssize_t extent = shape[0]
33000  *
33001  */
33002  __pyx_v_stride = (__pyx_v_strides[0]);
33003 
33004  /* "View.MemoryView":1409
33005  * cdef Py_ssize_t i
33006  * cdef Py_ssize_t stride = strides[0]
33007  * cdef Py_ssize_t extent = shape[0] # <<<<<<<<<<<<<<
33008  *
33009  * if ndim == 1:
33010  */
33011  __pyx_v_extent = (__pyx_v_shape[0]);
33012 
33013  /* "View.MemoryView":1411
33014  * cdef Py_ssize_t extent = shape[0]
33015  *
33016  * if ndim == 1: # <<<<<<<<<<<<<<
33017  * for i in range(extent):
33018  * memcpy(data, item, itemsize)
33019  */
33020  __pyx_t_1 = ((__pyx_v_ndim == 1) != 0);
33021  if (__pyx_t_1) {
33022 
33023  /* "View.MemoryView":1412
33024  *
33025  * if ndim == 1:
33026  * for i in range(extent): # <<<<<<<<<<<<<<
33027  * memcpy(data, item, itemsize)
33028  * data += stride
33029  */
33030  __pyx_t_2 = __pyx_v_extent;
33031  __pyx_t_3 = __pyx_t_2;
33032  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
33033  __pyx_v_i = __pyx_t_4;
33034 
33035  /* "View.MemoryView":1413
33036  * if ndim == 1:
33037  * for i in range(extent):
33038  * memcpy(data, item, itemsize) # <<<<<<<<<<<<<<
33039  * data += stride
33040  * else:
33041  */
33042  (void)(memcpy(__pyx_v_data, __pyx_v_item, __pyx_v_itemsize));
33043 
33044  /* "View.MemoryView":1414
33045  * for i in range(extent):
33046  * memcpy(data, item, itemsize)
33047  * data += stride # <<<<<<<<<<<<<<
33048  * else:
33049  * for i in range(extent):
33050  */
33051  __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
33052  }
33053 
33054  /* "View.MemoryView":1411
33055  * cdef Py_ssize_t extent = shape[0]
33056  *
33057  * if ndim == 1: # <<<<<<<<<<<<<<
33058  * for i in range(extent):
33059  * memcpy(data, item, itemsize)
33060  */
33061  goto __pyx_L3;
33062  }
33063 
33064  /* "View.MemoryView":1416
33065  * data += stride
33066  * else:
33067  * for i in range(extent): # <<<<<<<<<<<<<<
33068  * _slice_assign_scalar(data, shape + 1, strides + 1,
33069  * ndim - 1, itemsize, item)
33070  */
33071  /*else*/ {
33072  __pyx_t_2 = __pyx_v_extent;
33073  __pyx_t_3 = __pyx_t_2;
33074  for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
33075  __pyx_v_i = __pyx_t_4;
33076 
33077  /* "View.MemoryView":1417
33078  * else:
33079  * for i in range(extent):
33080  * _slice_assign_scalar(data, shape + 1, strides + 1, # <<<<<<<<<<<<<<
33081  * ndim - 1, itemsize, item)
33082  * data += stride
33083  */
33084  __pyx_memoryview__slice_assign_scalar(__pyx_v_data, (__pyx_v_shape + 1), (__pyx_v_strides + 1), (__pyx_v_ndim - 1), __pyx_v_itemsize, __pyx_v_item);
33085 
33086  /* "View.MemoryView":1419
33087  * _slice_assign_scalar(data, shape + 1, strides + 1,
33088  * ndim - 1, itemsize, item)
33089  * data += stride # <<<<<<<<<<<<<<
33090  *
33091  *
33092  */
33093  __pyx_v_data = (__pyx_v_data + __pyx_v_stride);
33094  }
33095  }
33096  __pyx_L3:;
33097 
33098  /* "View.MemoryView":1404
33099  *
33100  * @cname('__pyx_memoryview__slice_assign_scalar')
33101  * cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, # <<<<<<<<<<<<<<
33102  * Py_ssize_t *strides, int ndim,
33103  * size_t itemsize, void *item) nogil:
33104  */
33105 
33106  /* function exit code */
33107 }
33108 
33109 /* "(tree fragment)":1
33110  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
33111  * cdef object __pyx_PickleError
33112  * cdef object __pyx_result
33113  */
33114 
33115 /* Python wrapper */
33116 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
33117 static PyMethodDef __pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum = {"__pyx_unpickle_Enum", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum, METH_VARARGS|METH_KEYWORDS, 0};
33118 static PyObject *__pyx_pw_15View_dot_MemoryView_1__pyx_unpickle_Enum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
33119  PyObject *__pyx_v___pyx_type = 0;
33120  long __pyx_v___pyx_checksum;
33121  PyObject *__pyx_v___pyx_state = 0;
33122  PyObject *__pyx_r = 0;
33123  __Pyx_RefNannyDeclarations
33124  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum (wrapper)", 0);
33125  {
33126  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
33127  PyObject* values[3] = {0,0,0};
33128  if (unlikely(__pyx_kwds)) {
33129  Py_ssize_t kw_args;
33130  const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
33131  switch (pos_args) {
33132  case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
33133  CYTHON_FALLTHROUGH;
33134  case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33135  CYTHON_FALLTHROUGH;
33136  case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33137  CYTHON_FALLTHROUGH;
33138  case 0: break;
33139  default: goto __pyx_L5_argtuple_error;
33140  }
33141  kw_args = PyDict_Size(__pyx_kwds);
33142  switch (pos_args) {
33143  case 0:
33144  if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_type)) != 0)) kw_args--;
33145  else goto __pyx_L5_argtuple_error;
33146  CYTHON_FALLTHROUGH;
33147  case 1:
33148  if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_checksum)) != 0)) kw_args--;
33149  else {
33150  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 1); __PYX_ERR(0, 1, __pyx_L3_error)
33151  }
33152  CYTHON_FALLTHROUGH;
33153  case 2:
33154  if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pyx_state)) != 0)) kw_args--;
33155  else {
33156  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, 2); __PYX_ERR(0, 1, __pyx_L3_error)
33157  }
33158  }
33159  if (unlikely(kw_args > 0)) {
33160  if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pyx_unpickle_Enum") < 0)) __PYX_ERR(0, 1, __pyx_L3_error)
33161  }
33162  } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
33163  goto __pyx_L5_argtuple_error;
33164  } else {
33165  values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
33166  values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
33167  values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
33168  }
33169  __pyx_v___pyx_type = values[0];
33170  __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L3_error)
33171  __pyx_v___pyx_state = values[2];
33172  }
33173  goto __pyx_L4_argument_unpacking_done;
33174  __pyx_L5_argtuple_error:;
33175  __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Enum", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1, __pyx_L3_error)
33176  __pyx_L3_error:;
33177  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
33178  __Pyx_RefNannyFinishContext();
33179  return NULL;
33180  __pyx_L4_argument_unpacking_done:;
33181  __pyx_r = __pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
33182 
33183  /* function exit code */
33184  __Pyx_RefNannyFinishContext();
33185  return __pyx_r;
33186 }
33187 
33188 static PyObject *__pyx_pf_15View_dot_MemoryView___pyx_unpickle_Enum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
33189  PyObject *__pyx_v___pyx_PickleError = 0;
33190  PyObject *__pyx_v___pyx_result = 0;
33191  PyObject *__pyx_r = NULL;
33192  __Pyx_RefNannyDeclarations
33193  int __pyx_t_1;
33194  PyObject *__pyx_t_2 = NULL;
33195  PyObject *__pyx_t_3 = NULL;
33196  PyObject *__pyx_t_4 = NULL;
33197  PyObject *__pyx_t_5 = NULL;
33198  int __pyx_t_6;
33199  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum", 0);
33200 
33201  /* "(tree fragment)":4
33202  * cdef object __pyx_PickleError
33203  * cdef object __pyx_result
33204  * if __pyx_checksum != 0xb068931: # <<<<<<<<<<<<<<
33205  * from pickle import PickleError as __pyx_PickleError
33206  * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
33207  */
33208  __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb068931) != 0);
33209  if (__pyx_t_1) {
33210 
33211  /* "(tree fragment)":5
33212  * cdef object __pyx_result
33213  * if __pyx_checksum != 0xb068931:
33214  * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
33215  * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
33216  * __pyx_result = Enum.__new__(__pyx_type)
33217  */
33218  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
33219  __Pyx_GOTREF(__pyx_t_2);
33220  __Pyx_INCREF(__pyx_n_s_PickleError);
33221  __Pyx_GIVEREF(__pyx_n_s_PickleError);
33222  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError);
33223  __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 5, __pyx_L1_error)
33224  __Pyx_GOTREF(__pyx_t_3);
33225  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33226  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 5, __pyx_L1_error)
33227  __Pyx_GOTREF(__pyx_t_2);
33228  __Pyx_INCREF(__pyx_t_2);
33229  __pyx_v___pyx_PickleError = __pyx_t_2;
33230  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33231  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33232 
33233  /* "(tree fragment)":6
33234  * if __pyx_checksum != 0xb068931:
33235  * from pickle import PickleError as __pyx_PickleError
33236  * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum) # <<<<<<<<<<<<<<
33237  * __pyx_result = Enum.__new__(__pyx_type)
33238  * if __pyx_state is not None:
33239  */
33240  __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
33241  __Pyx_GOTREF(__pyx_t_2);
33242  __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 6, __pyx_L1_error)
33243  __Pyx_GOTREF(__pyx_t_4);
33244  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33245  __Pyx_INCREF(__pyx_v___pyx_PickleError);
33246  __pyx_t_2 = __pyx_v___pyx_PickleError; __pyx_t_5 = NULL;
33247  if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
33248  __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
33249  if (likely(__pyx_t_5)) {
33250  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
33251  __Pyx_INCREF(__pyx_t_5);
33252  __Pyx_INCREF(function);
33253  __Pyx_DECREF_SET(__pyx_t_2, function);
33254  }
33255  }
33256  __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4);
33257  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
33258  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
33259  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 6, __pyx_L1_error)
33260  __Pyx_GOTREF(__pyx_t_3);
33261  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33262  __Pyx_Raise(__pyx_t_3, 0, 0, 0);
33263  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33264  __PYX_ERR(0, 6, __pyx_L1_error)
33265 
33266  /* "(tree fragment)":4
33267  * cdef object __pyx_PickleError
33268  * cdef object __pyx_result
33269  * if __pyx_checksum != 0xb068931: # <<<<<<<<<<<<<<
33270  * from pickle import PickleError as __pyx_PickleError
33271  * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
33272  */
33273  }
33274 
33275  /* "(tree fragment)":7
33276  * from pickle import PickleError as __pyx_PickleError
33277  * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
33278  * __pyx_result = Enum.__new__(__pyx_type) # <<<<<<<<<<<<<<
33279  * if __pyx_state is not None:
33280  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
33281  */
33282  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_MemviewEnum_type), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
33283  __Pyx_GOTREF(__pyx_t_2);
33284  __pyx_t_4 = NULL;
33285  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
33286  __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
33287  if (likely(__pyx_t_4)) {
33288  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
33289  __Pyx_INCREF(__pyx_t_4);
33290  __Pyx_INCREF(function);
33291  __Pyx_DECREF_SET(__pyx_t_2, function);
33292  }
33293  }
33294  __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type);
33295  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
33296  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 7, __pyx_L1_error)
33297  __Pyx_GOTREF(__pyx_t_3);
33298  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
33299  __pyx_v___pyx_result = __pyx_t_3;
33300  __pyx_t_3 = 0;
33301 
33302  /* "(tree fragment)":8
33303  * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
33304  * __pyx_result = Enum.__new__(__pyx_type)
33305  * if __pyx_state is not None: # <<<<<<<<<<<<<<
33306  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
33307  * return __pyx_result
33308  */
33309  __pyx_t_1 = (__pyx_v___pyx_state != Py_None);
33310  __pyx_t_6 = (__pyx_t_1 != 0);
33311  if (__pyx_t_6) {
33312 
33313  /* "(tree fragment)":9
33314  * __pyx_result = Enum.__new__(__pyx_type)
33315  * if __pyx_state is not None:
33316  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
33317  * return __pyx_result
33318  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
33319  */
33320  if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(0, 9, __pyx_L1_error)
33321  __pyx_t_3 = __pyx_unpickle_Enum__set_state(((struct __pyx_MemviewEnum_obj *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 9, __pyx_L1_error)
33322  __Pyx_GOTREF(__pyx_t_3);
33323  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33324 
33325  /* "(tree fragment)":8
33326  * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb068931 = (name))" % __pyx_checksum)
33327  * __pyx_result = Enum.__new__(__pyx_type)
33328  * if __pyx_state is not None: # <<<<<<<<<<<<<<
33329  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
33330  * return __pyx_result
33331  */
33332  }
33333 
33334  /* "(tree fragment)":10
33335  * if __pyx_state is not None:
33336  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
33337  * return __pyx_result # <<<<<<<<<<<<<<
33338  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
33339  * __pyx_result.name = __pyx_state[0]
33340  */
33341  __Pyx_XDECREF(__pyx_r);
33342  __Pyx_INCREF(__pyx_v___pyx_result);
33343  __pyx_r = __pyx_v___pyx_result;
33344  goto __pyx_L0;
33345 
33346  /* "(tree fragment)":1
33347  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
33348  * cdef object __pyx_PickleError
33349  * cdef object __pyx_result
33350  */
33351 
33352  /* function exit code */
33353  __pyx_L1_error:;
33354  __Pyx_XDECREF(__pyx_t_2);
33355  __Pyx_XDECREF(__pyx_t_3);
33356  __Pyx_XDECREF(__pyx_t_4);
33357  __Pyx_XDECREF(__pyx_t_5);
33358  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum", __pyx_clineno, __pyx_lineno, __pyx_filename);
33359  __pyx_r = NULL;
33360  __pyx_L0:;
33361  __Pyx_XDECREF(__pyx_v___pyx_PickleError);
33362  __Pyx_XDECREF(__pyx_v___pyx_result);
33363  __Pyx_XGIVEREF(__pyx_r);
33364  __Pyx_RefNannyFinishContext();
33365  return __pyx_r;
33366 }
33367 
33368 /* "(tree fragment)":11
33369  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
33370  * return __pyx_result
33371  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
33372  * __pyx_result.name = __pyx_state[0]
33373  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
33374  */
33375 
33376 static PyObject *__pyx_unpickle_Enum__set_state(struct __pyx_MemviewEnum_obj *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
33377  PyObject *__pyx_r = NULL;
33378  __Pyx_RefNannyDeclarations
33379  PyObject *__pyx_t_1 = NULL;
33380  int __pyx_t_2;
33381  Py_ssize_t __pyx_t_3;
33382  int __pyx_t_4;
33383  int __pyx_t_5;
33384  PyObject *__pyx_t_6 = NULL;
33385  PyObject *__pyx_t_7 = NULL;
33386  PyObject *__pyx_t_8 = NULL;
33387  __Pyx_RefNannySetupContext("__pyx_unpickle_Enum__set_state", 0);
33388 
33389  /* "(tree fragment)":12
33390  * return __pyx_result
33391  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
33392  * __pyx_result.name = __pyx_state[0] # <<<<<<<<<<<<<<
33393  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
33394  * __pyx_result.__dict__.update(__pyx_state[1])
33395  */
33396  if (unlikely(__pyx_v___pyx_state == Py_None)) {
33397  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
33398  __PYX_ERR(0, 12, __pyx_L1_error)
33399  }
33400  __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 12, __pyx_L1_error)
33401  __Pyx_GOTREF(__pyx_t_1);
33402  __Pyx_GIVEREF(__pyx_t_1);
33403  __Pyx_GOTREF(__pyx_v___pyx_result->name);
33404  __Pyx_DECREF(__pyx_v___pyx_result->name);
33405  __pyx_v___pyx_result->name = __pyx_t_1;
33406  __pyx_t_1 = 0;
33407 
33408  /* "(tree fragment)":13
33409  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
33410  * __pyx_result.name = __pyx_state[0]
33411  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
33412  * __pyx_result.__dict__.update(__pyx_state[1])
33413  */
33414  if (unlikely(__pyx_v___pyx_state == Py_None)) {
33415  PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
33416  __PYX_ERR(0, 13, __pyx_L1_error)
33417  }
33418  __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 13, __pyx_L1_error)
33419  __pyx_t_4 = ((__pyx_t_3 > 1) != 0);
33420  if (__pyx_t_4) {
33421  } else {
33422  __pyx_t_2 = __pyx_t_4;
33423  goto __pyx_L4_bool_binop_done;
33424  }
33425  __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 13, __pyx_L1_error)
33426  __pyx_t_5 = (__pyx_t_4 != 0);
33427  __pyx_t_2 = __pyx_t_5;
33428  __pyx_L4_bool_binop_done:;
33429  if (__pyx_t_2) {
33430 
33431  /* "(tree fragment)":14
33432  * __pyx_result.name = __pyx_state[0]
33433  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
33434  * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
33435  */
33436  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14, __pyx_L1_error)
33437  __Pyx_GOTREF(__pyx_t_6);
33438  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 14, __pyx_L1_error)
33439  __Pyx_GOTREF(__pyx_t_7);
33440  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
33441  if (unlikely(__pyx_v___pyx_state == Py_None)) {
33442  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
33443  __PYX_ERR(0, 14, __pyx_L1_error)
33444  }
33445  __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 14, __pyx_L1_error)
33446  __Pyx_GOTREF(__pyx_t_6);
33447  __pyx_t_8 = NULL;
33448  if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) {
33449  __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
33450  if (likely(__pyx_t_8)) {
33451  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
33452  __Pyx_INCREF(__pyx_t_8);
33453  __Pyx_INCREF(function);
33454  __Pyx_DECREF_SET(__pyx_t_7, function);
33455  }
33456  }
33457  __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6);
33458  __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
33459  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
33460  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
33461  __Pyx_GOTREF(__pyx_t_1);
33462  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
33463  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
33464 
33465  /* "(tree fragment)":13
33466  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state):
33467  * __pyx_result.name = __pyx_state[0]
33468  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
33469  * __pyx_result.__dict__.update(__pyx_state[1])
33470  */
33471  }
33472 
33473  /* "(tree fragment)":11
33474  * __pyx_unpickle_Enum__set_state(<Enum> __pyx_result, __pyx_state)
33475  * return __pyx_result
33476  * cdef __pyx_unpickle_Enum__set_state(Enum __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
33477  * __pyx_result.name = __pyx_state[0]
33478  * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
33479  */
33480 
33481  /* function exit code */
33482  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
33483  goto __pyx_L0;
33484  __pyx_L1_error:;
33485  __Pyx_XDECREF(__pyx_t_1);
33486  __Pyx_XDECREF(__pyx_t_6);
33487  __Pyx_XDECREF(__pyx_t_7);
33488  __Pyx_XDECREF(__pyx_t_8);
33489  __Pyx_AddTraceback("View.MemoryView.__pyx_unpickle_Enum__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
33490  __pyx_r = 0;
33491  __pyx_L0:;
33492  __Pyx_XGIVEREF(__pyx_r);
33493  __Pyx_RefNannyFinishContext();
33494  return __pyx_r;
33495 }
33496 
33497 /* "BufferFormatFromTypeInfo":1460
33498  *
33499  * @cname('__pyx_format_from_typeinfo')
33500  * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<<
33501  * cdef __Pyx_StructField *field
33502  * cdef __pyx_typeinfo_string fmt
33503  */
33504 
33505 static PyObject *__pyx_format_from_typeinfo(__Pyx_TypeInfo *__pyx_v_type) {
33506  __Pyx_StructField *__pyx_v_field;
33507  struct __pyx_typeinfo_string __pyx_v_fmt;
33508  PyObject *__pyx_v_part = 0;
33509  PyObject *__pyx_v_result = 0;
33510  PyObject *__pyx_v_alignment = NULL;
33511  PyObject *__pyx_v_parts = NULL;
33512  PyObject *__pyx_v_extents = NULL;
33513  int __pyx_v_i;
33514  PyObject *__pyx_r = NULL;
33515  __Pyx_RefNannyDeclarations
33516  int __pyx_t_1;
33517  int __pyx_t_2;
33518  PyObject *__pyx_t_3 = NULL;
33519  __Pyx_StructField *__pyx_t_4;
33520  PyObject *__pyx_t_5 = NULL;
33521  PyObject *__pyx_t_6 = NULL;
33522  int __pyx_t_7;
33523  int __pyx_t_8;
33524  int __pyx_t_9;
33525  int __pyx_t_10;
33526  __Pyx_RefNannySetupContext("format_from_typeinfo", 0);
33527 
33528  /* "BufferFormatFromTypeInfo":1465
33529  * cdef bytes part, result
33530  *
33531  * if type.typegroup == 'S': # <<<<<<<<<<<<<<
33532  * assert type.fields != NULL and type.fields.type != NULL
33533  *
33534  */
33535  __pyx_t_1 = ((__pyx_v_type->typegroup == 'S') != 0);
33536  if (__pyx_t_1) {
33537 
33538  /* "BufferFormatFromTypeInfo":1466
33539  *
33540  * if type.typegroup == 'S':
33541  * assert type.fields != NULL and type.fields.type != NULL # <<<<<<<<<<<<<<
33542  *
33543  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT:
33544  */
33545  #ifndef CYTHON_WITHOUT_ASSERTIONS
33546  if (unlikely(!Py_OptimizeFlag)) {
33547  __pyx_t_2 = ((__pyx_v_type->fields != NULL) != 0);
33548  if (__pyx_t_2) {
33549  } else {
33550  __pyx_t_1 = __pyx_t_2;
33551  goto __pyx_L4_bool_binop_done;
33552  }
33553  __pyx_t_2 = ((__pyx_v_type->fields->type != NULL) != 0);
33554  __pyx_t_1 = __pyx_t_2;
33555  __pyx_L4_bool_binop_done:;
33556  if (unlikely(!__pyx_t_1)) {
33557  PyErr_SetNone(PyExc_AssertionError);
33558  __PYX_ERR(0, 1466, __pyx_L1_error)
33559  }
33560  }
33561  #endif
33562 
33563  /* "BufferFormatFromTypeInfo":1468
33564  * assert type.fields != NULL and type.fields.type != NULL
33565  *
33566  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: # <<<<<<<<<<<<<<
33567  * alignment = b'^'
33568  * else:
33569  */
33570  __pyx_t_1 = ((__pyx_v_type->flags & __PYX_BUF_FLAGS_PACKED_STRUCT) != 0);
33571  if (__pyx_t_1) {
33572 
33573  /* "BufferFormatFromTypeInfo":1469
33574  *
33575  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT:
33576  * alignment = b'^' # <<<<<<<<<<<<<<
33577  * else:
33578  * alignment = b''
33579  */
33580  __Pyx_INCREF(__pyx_kp_b__31);
33581  __pyx_v_alignment = __pyx_kp_b__31;
33582 
33583  /* "BufferFormatFromTypeInfo":1468
33584  * assert type.fields != NULL and type.fields.type != NULL
33585  *
33586  * if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: # <<<<<<<<<<<<<<
33587  * alignment = b'^'
33588  * else:
33589  */
33590  goto __pyx_L6;
33591  }
33592 
33593  /* "BufferFormatFromTypeInfo":1471
33594  * alignment = b'^'
33595  * else:
33596  * alignment = b'' # <<<<<<<<<<<<<<
33597  *
33598  * parts = [b"T{"]
33599  */
33600  /*else*/ {
33601  __Pyx_INCREF(__pyx_kp_b__32);
33602  __pyx_v_alignment = __pyx_kp_b__32;
33603  }
33604  __pyx_L6:;
33605 
33606  /* "BufferFormatFromTypeInfo":1473
33607  * alignment = b''
33608  *
33609  * parts = [b"T{"] # <<<<<<<<<<<<<<
33610  * field = type.fields
33611  *
33612  */
33613  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1473, __pyx_L1_error)
33614  __Pyx_GOTREF(__pyx_t_3);
33615  __Pyx_INCREF(__pyx_kp_b_T);
33616  __Pyx_GIVEREF(__pyx_kp_b_T);
33617  PyList_SET_ITEM(__pyx_t_3, 0, __pyx_kp_b_T);
33618  __pyx_v_parts = ((PyObject*)__pyx_t_3);
33619  __pyx_t_3 = 0;
33620 
33621  /* "BufferFormatFromTypeInfo":1474
33622  *
33623  * parts = [b"T{"]
33624  * field = type.fields # <<<<<<<<<<<<<<
33625  *
33626  * while field.type:
33627  */
33628  __pyx_t_4 = __pyx_v_type->fields;
33629  __pyx_v_field = __pyx_t_4;
33630 
33631  /* "BufferFormatFromTypeInfo":1476
33632  * field = type.fields
33633  *
33634  * while field.type: # <<<<<<<<<<<<<<
33635  * part = format_from_typeinfo(field.type)
33636  * parts.append(part + b':' + field.name + b':')
33637  */
33638  while (1) {
33639  __pyx_t_1 = (__pyx_v_field->type != 0);
33640  if (!__pyx_t_1) break;
33641 
33642  /* "BufferFormatFromTypeInfo":1477
33643  *
33644  * while field.type:
33645  * part = format_from_typeinfo(field.type) # <<<<<<<<<<<<<<
33646  * parts.append(part + b':' + field.name + b':')
33647  * field += 1
33648  */
33649  __pyx_t_3 = __pyx_format_from_typeinfo(__pyx_v_field->type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1477, __pyx_L1_error)
33650  __Pyx_GOTREF(__pyx_t_3);
33651  __Pyx_XDECREF_SET(__pyx_v_part, ((PyObject*)__pyx_t_3));
33652  __pyx_t_3 = 0;
33653 
33654  /* "BufferFormatFromTypeInfo":1478
33655  * while field.type:
33656  * part = format_from_typeinfo(field.type)
33657  * parts.append(part + b':' + field.name + b':') # <<<<<<<<<<<<<<
33658  * field += 1
33659  *
33660  */
33661  __pyx_t_3 = PyNumber_Add(__pyx_v_part, __pyx_kp_b__33); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1478, __pyx_L1_error)
33662  __Pyx_GOTREF(__pyx_t_3);
33663  __pyx_t_5 = __Pyx_PyBytes_FromString(__pyx_v_field->name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1478, __pyx_L1_error)
33664  __Pyx_GOTREF(__pyx_t_5);
33665  __pyx_t_6 = PyNumber_Add(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1478, __pyx_L1_error)
33666  __Pyx_GOTREF(__pyx_t_6);
33667  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33668  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
33669  __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_b__33); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1478, __pyx_L1_error)
33670  __Pyx_GOTREF(__pyx_t_5);
33671  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
33672  __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_parts, __pyx_t_5); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1478, __pyx_L1_error)
33673  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
33674 
33675  /* "BufferFormatFromTypeInfo":1479
33676  * part = format_from_typeinfo(field.type)
33677  * parts.append(part + b':' + field.name + b':')
33678  * field += 1 # <<<<<<<<<<<<<<
33679  *
33680  * result = alignment.join(parts) + b'}'
33681  */
33682  __pyx_v_field = (__pyx_v_field + 1);
33683  }
33684 
33685  /* "BufferFormatFromTypeInfo":1481
33686  * field += 1
33687  *
33688  * result = alignment.join(parts) + b'}' # <<<<<<<<<<<<<<
33689  * else:
33690  * fmt = __Pyx_TypeInfoToFormat(type)
33691  */
33692  __pyx_t_5 = __Pyx_PyBytes_Join(__pyx_v_alignment, __pyx_v_parts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1481, __pyx_L1_error)
33693  __Pyx_GOTREF(__pyx_t_5);
33694  __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_kp_b__34); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1481, __pyx_L1_error)
33695  __Pyx_GOTREF(__pyx_t_6);
33696  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
33697  if (!(likely(PyBytes_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 1481, __pyx_L1_error)
33698  __pyx_v_result = ((PyObject*)__pyx_t_6);
33699  __pyx_t_6 = 0;
33700 
33701  /* "BufferFormatFromTypeInfo":1465
33702  * cdef bytes part, result
33703  *
33704  * if type.typegroup == 'S': # <<<<<<<<<<<<<<
33705  * assert type.fields != NULL and type.fields.type != NULL
33706  *
33707  */
33708  goto __pyx_L3;
33709  }
33710 
33711  /* "BufferFormatFromTypeInfo":1483
33712  * result = alignment.join(parts) + b'}'
33713  * else:
33714  * fmt = __Pyx_TypeInfoToFormat(type) # <<<<<<<<<<<<<<
33715  * if type.arraysize[0]:
33716  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
33717  */
33718  /*else*/ {
33719  __pyx_v_fmt = __Pyx_TypeInfoToFormat(__pyx_v_type);
33720 
33721  /* "BufferFormatFromTypeInfo":1484
33722  * else:
33723  * fmt = __Pyx_TypeInfoToFormat(type)
33724  * if type.arraysize[0]: # <<<<<<<<<<<<<<
33725  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
33726  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
33727  */
33728  __pyx_t_1 = ((__pyx_v_type->arraysize[0]) != 0);
33729  if (__pyx_t_1) {
33730 
33731  /* "BufferFormatFromTypeInfo":1485
33732  * fmt = __Pyx_TypeInfoToFormat(type)
33733  * if type.arraysize[0]:
33734  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)] # <<<<<<<<<<<<<<
33735  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
33736  * else:
33737  */
33738  __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1485, __pyx_L1_error)
33739  __Pyx_GOTREF(__pyx_t_6);
33740  __pyx_t_8 = __pyx_v_type->ndim;
33741  __pyx_t_9 = __pyx_t_8;
33742  for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) {
33743  __pyx_v_i = __pyx_t_10;
33744  __pyx_t_5 = __Pyx_PyInt_FromSize_t((__pyx_v_type->arraysize[__pyx_v_i])); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1485, __pyx_L1_error)
33745  __Pyx_GOTREF(__pyx_t_5);
33746  __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1485, __pyx_L1_error)
33747  __Pyx_GOTREF(__pyx_t_3);
33748  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
33749  if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1485, __pyx_L1_error)
33750  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33751  }
33752  __pyx_v_extents = ((PyObject*)__pyx_t_6);
33753  __pyx_t_6 = 0;
33754 
33755  /* "BufferFormatFromTypeInfo":1486
33756  * if type.arraysize[0]:
33757  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
33758  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string # <<<<<<<<<<<<<<
33759  * else:
33760  * result = fmt.string
33761  */
33762  __pyx_t_6 = PyUnicode_Join(__pyx_kp_u__35, __pyx_v_extents); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1486, __pyx_L1_error)
33763  __Pyx_GOTREF(__pyx_t_6);
33764  __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_s, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1486, __pyx_L1_error)
33765  __Pyx_GOTREF(__pyx_t_3);
33766  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
33767  __pyx_t_6 = PyUnicode_AsASCIIString(((PyObject*)__pyx_t_3)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1486, __pyx_L1_error)
33768  __Pyx_GOTREF(__pyx_t_6);
33769  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33770  __pyx_t_3 = __Pyx_PyObject_FromString(__pyx_v_fmt.string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1486, __pyx_L1_error)
33771  __Pyx_GOTREF(__pyx_t_3);
33772  __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1486, __pyx_L1_error)
33773  __Pyx_GOTREF(__pyx_t_5);
33774  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
33775  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
33776  if (!(likely(PyBytes_CheckExact(__pyx_t_5))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1486, __pyx_L1_error)
33777  __pyx_v_result = ((PyObject*)__pyx_t_5);
33778  __pyx_t_5 = 0;
33779 
33780  /* "BufferFormatFromTypeInfo":1484
33781  * else:
33782  * fmt = __Pyx_TypeInfoToFormat(type)
33783  * if type.arraysize[0]: # <<<<<<<<<<<<<<
33784  * extents = [unicode(type.arraysize[i]) for i in range(type.ndim)]
33785  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
33786  */
33787  goto __pyx_L9;
33788  }
33789 
33790  /* "BufferFormatFromTypeInfo":1488
33791  * result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string
33792  * else:
33793  * result = fmt.string # <<<<<<<<<<<<<<
33794  *
33795  * return result
33796  */
33797  /*else*/ {
33798  __pyx_t_5 = __Pyx_PyObject_FromString(__pyx_v_fmt.string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1488, __pyx_L1_error)
33799  __Pyx_GOTREF(__pyx_t_5);
33800  __pyx_v_result = ((PyObject*)__pyx_t_5);
33801  __pyx_t_5 = 0;
33802  }
33803  __pyx_L9:;
33804  }
33805  __pyx_L3:;
33806 
33807  /* "BufferFormatFromTypeInfo":1490
33808  * result = fmt.string
33809  *
33810  * return result # <<<<<<<<<<<<<<
33811  */
33812  __Pyx_XDECREF(__pyx_r);
33813  __Pyx_INCREF(__pyx_v_result);
33814  __pyx_r = __pyx_v_result;
33815  goto __pyx_L0;
33816 
33817  /* "BufferFormatFromTypeInfo":1460
33818  *
33819  * @cname('__pyx_format_from_typeinfo')
33820  * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<<
33821  * cdef __Pyx_StructField *field
33822  * cdef __pyx_typeinfo_string fmt
33823  */
33824 
33825  /* function exit code */
33826  __pyx_L1_error:;
33827  __Pyx_XDECREF(__pyx_t_3);
33828  __Pyx_XDECREF(__pyx_t_5);
33829  __Pyx_XDECREF(__pyx_t_6);
33830  __Pyx_AddTraceback("BufferFormatFromTypeInfo.format_from_typeinfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
33831  __pyx_r = 0;
33832  __pyx_L0:;
33833  __Pyx_XDECREF(__pyx_v_part);
33834  __Pyx_XDECREF(__pyx_v_result);
33835  __Pyx_XDECREF(__pyx_v_alignment);
33836  __Pyx_XDECREF(__pyx_v_parts);
33837  __Pyx_XDECREF(__pyx_v_extents);
33838  __Pyx_XGIVEREF(__pyx_r);
33839  __Pyx_RefNannyFinishContext();
33840  return __pyx_r;
33841 }
33842 
33843 static PyObject *__pyx_tp_new_10cmeshTools_CMesh(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
33844  struct __pyx_obj_10cmeshTools_CMesh *p;
33845  PyObject *o;
33846  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
33847  o = (*t->tp_alloc)(t, 0);
33848  } else {
33849  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
33850  }
33851  if (unlikely(!o)) return 0;
33852  p = ((struct __pyx_obj_10cmeshTools_CMesh *)o);
33853  p->elementNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33854  p->nodeElementsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33855  p->nodeElementOffsets = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33856  p->elementNeighborsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33857  p->elementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33858  p->elementBoundaryNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33859  p->elementBoundaryElementsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33860  p->elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33861  p->interiorElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33862  p->exteriorElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33863  p->edgeNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33864  p->nodeStarArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33865  p->nodeStarOffsets = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33866  p->elementMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33867  p->elementBoundaryMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33868  p->nodeMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33869  p->nodeArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33870  p->elementIJK = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33871  p->weights = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33872  p->U_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33873  p->V_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33874  p->W_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33875  p->elementDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33876  p->elementInnerDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33877  p->elementBoundaryDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33878  p->elementBarycentersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33879  p->elementBoundaryBarycentersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33880  p->nodeDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33881  p->nodeSupportArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
33882  return o;
33883 }
33884 
33885 static void __pyx_tp_dealloc_10cmeshTools_CMesh(PyObject *o) {
33886  struct __pyx_obj_10cmeshTools_CMesh *p = (struct __pyx_obj_10cmeshTools_CMesh *)o;
33887  #if CYTHON_USE_TP_FINALIZE
33888  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
33889  if (PyObject_CallFinalizerFromDealloc(o)) return;
33890  }
33891  #endif
33892  PyObject_GC_UnTrack(o);
33893  Py_CLEAR(p->elementNodesArray);
33894  Py_CLEAR(p->nodeElementsArray);
33895  Py_CLEAR(p->nodeElementOffsets);
33896  Py_CLEAR(p->elementNeighborsArray);
33897  Py_CLEAR(p->elementBoundariesArray);
33898  Py_CLEAR(p->elementBoundaryNodesArray);
33899  Py_CLEAR(p->elementBoundaryElementsArray);
33900  Py_CLEAR(p->elementBoundaryLocalElementBoundariesArray);
33901  Py_CLEAR(p->interiorElementBoundariesArray);
33902  Py_CLEAR(p->exteriorElementBoundariesArray);
33903  Py_CLEAR(p->edgeNodesArray);
33904  Py_CLEAR(p->nodeStarArray);
33905  Py_CLEAR(p->nodeStarOffsets);
33906  Py_CLEAR(p->elementMaterialTypes);
33907  Py_CLEAR(p->elementBoundaryMaterialTypes);
33908  Py_CLEAR(p->nodeMaterialTypes);
33909  Py_CLEAR(p->nodeArray);
33910  Py_CLEAR(p->elementIJK);
33911  Py_CLEAR(p->weights);
33912  Py_CLEAR(p->U_KNOT);
33913  Py_CLEAR(p->V_KNOT);
33914  Py_CLEAR(p->W_KNOT);
33915  Py_CLEAR(p->elementDiametersArray);
33916  Py_CLEAR(p->elementInnerDiametersArray);
33917  Py_CLEAR(p->elementBoundaryDiametersArray);
33918  Py_CLEAR(p->elementBarycentersArray);
33919  Py_CLEAR(p->elementBoundaryBarycentersArray);
33920  Py_CLEAR(p->nodeDiametersArray);
33921  Py_CLEAR(p->nodeSupportArray);
33922  (*Py_TYPE(o)->tp_free)(o);
33923 }
33924 
33925 static int __pyx_tp_traverse_10cmeshTools_CMesh(PyObject *o, visitproc v, void *a) {
33926  int e;
33927  struct __pyx_obj_10cmeshTools_CMesh *p = (struct __pyx_obj_10cmeshTools_CMesh *)o;
33928  if (p->elementNodesArray) {
33929  e = (*v)(((PyObject *)p->elementNodesArray), a); if (e) return e;
33930  }
33931  if (p->nodeElementsArray) {
33932  e = (*v)(((PyObject *)p->nodeElementsArray), a); if (e) return e;
33933  }
33934  if (p->nodeElementOffsets) {
33935  e = (*v)(((PyObject *)p->nodeElementOffsets), a); if (e) return e;
33936  }
33937  if (p->elementNeighborsArray) {
33938  e = (*v)(((PyObject *)p->elementNeighborsArray), a); if (e) return e;
33939  }
33940  if (p->elementBoundariesArray) {
33941  e = (*v)(((PyObject *)p->elementBoundariesArray), a); if (e) return e;
33942  }
33943  if (p->elementBoundaryNodesArray) {
33944  e = (*v)(((PyObject *)p->elementBoundaryNodesArray), a); if (e) return e;
33945  }
33946  if (p->elementBoundaryElementsArray) {
33947  e = (*v)(((PyObject *)p->elementBoundaryElementsArray), a); if (e) return e;
33948  }
33949  if (p->elementBoundaryLocalElementBoundariesArray) {
33950  e = (*v)(((PyObject *)p->elementBoundaryLocalElementBoundariesArray), a); if (e) return e;
33951  }
33952  if (p->interiorElementBoundariesArray) {
33953  e = (*v)(((PyObject *)p->interiorElementBoundariesArray), a); if (e) return e;
33954  }
33955  if (p->exteriorElementBoundariesArray) {
33956  e = (*v)(((PyObject *)p->exteriorElementBoundariesArray), a); if (e) return e;
33957  }
33958  if (p->edgeNodesArray) {
33959  e = (*v)(((PyObject *)p->edgeNodesArray), a); if (e) return e;
33960  }
33961  if (p->nodeStarArray) {
33962  e = (*v)(((PyObject *)p->nodeStarArray), a); if (e) return e;
33963  }
33964  if (p->nodeStarOffsets) {
33965  e = (*v)(((PyObject *)p->nodeStarOffsets), a); if (e) return e;
33966  }
33967  if (p->elementMaterialTypes) {
33968  e = (*v)(((PyObject *)p->elementMaterialTypes), a); if (e) return e;
33969  }
33970  if (p->elementBoundaryMaterialTypes) {
33971  e = (*v)(((PyObject *)p->elementBoundaryMaterialTypes), a); if (e) return e;
33972  }
33973  if (p->nodeMaterialTypes) {
33974  e = (*v)(((PyObject *)p->nodeMaterialTypes), a); if (e) return e;
33975  }
33976  if (p->nodeArray) {
33977  e = (*v)(((PyObject *)p->nodeArray), a); if (e) return e;
33978  }
33979  if (p->elementIJK) {
33980  e = (*v)(((PyObject *)p->elementIJK), a); if (e) return e;
33981  }
33982  if (p->weights) {
33983  e = (*v)(((PyObject *)p->weights), a); if (e) return e;
33984  }
33985  if (p->U_KNOT) {
33986  e = (*v)(((PyObject *)p->U_KNOT), a); if (e) return e;
33987  }
33988  if (p->V_KNOT) {
33989  e = (*v)(((PyObject *)p->V_KNOT), a); if (e) return e;
33990  }
33991  if (p->W_KNOT) {
33992  e = (*v)(((PyObject *)p->W_KNOT), a); if (e) return e;
33993  }
33994  if (p->elementDiametersArray) {
33995  e = (*v)(((PyObject *)p->elementDiametersArray), a); if (e) return e;
33996  }
33997  if (p->elementInnerDiametersArray) {
33998  e = (*v)(((PyObject *)p->elementInnerDiametersArray), a); if (e) return e;
33999  }
34000  if (p->elementBoundaryDiametersArray) {
34001  e = (*v)(((PyObject *)p->elementBoundaryDiametersArray), a); if (e) return e;
34002  }
34003  if (p->elementBarycentersArray) {
34004  e = (*v)(((PyObject *)p->elementBarycentersArray), a); if (e) return e;
34005  }
34006  if (p->elementBoundaryBarycentersArray) {
34007  e = (*v)(((PyObject *)p->elementBoundaryBarycentersArray), a); if (e) return e;
34008  }
34009  if (p->nodeDiametersArray) {
34010  e = (*v)(((PyObject *)p->nodeDiametersArray), a); if (e) return e;
34011  }
34012  if (p->nodeSupportArray) {
34013  e = (*v)(((PyObject *)p->nodeSupportArray), a); if (e) return e;
34014  }
34015  return 0;
34016 }
34017 
34018 static int __pyx_tp_clear_10cmeshTools_CMesh(PyObject *o) {
34019  PyObject* tmp;
34020  struct __pyx_obj_10cmeshTools_CMesh *p = (struct __pyx_obj_10cmeshTools_CMesh *)o;
34021  tmp = ((PyObject*)p->elementNodesArray);
34022  p->elementNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34023  Py_XDECREF(tmp);
34024  tmp = ((PyObject*)p->nodeElementsArray);
34025  p->nodeElementsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34026  Py_XDECREF(tmp);
34027  tmp = ((PyObject*)p->nodeElementOffsets);
34028  p->nodeElementOffsets = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34029  Py_XDECREF(tmp);
34030  tmp = ((PyObject*)p->elementNeighborsArray);
34031  p->elementNeighborsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34032  Py_XDECREF(tmp);
34033  tmp = ((PyObject*)p->elementBoundariesArray);
34034  p->elementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34035  Py_XDECREF(tmp);
34036  tmp = ((PyObject*)p->elementBoundaryNodesArray);
34037  p->elementBoundaryNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34038  Py_XDECREF(tmp);
34039  tmp = ((PyObject*)p->elementBoundaryElementsArray);
34040  p->elementBoundaryElementsArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34041  Py_XDECREF(tmp);
34042  tmp = ((PyObject*)p->elementBoundaryLocalElementBoundariesArray);
34043  p->elementBoundaryLocalElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34044  Py_XDECREF(tmp);
34045  tmp = ((PyObject*)p->interiorElementBoundariesArray);
34046  p->interiorElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34047  Py_XDECREF(tmp);
34048  tmp = ((PyObject*)p->exteriorElementBoundariesArray);
34049  p->exteriorElementBoundariesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34050  Py_XDECREF(tmp);
34051  tmp = ((PyObject*)p->edgeNodesArray);
34052  p->edgeNodesArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34053  Py_XDECREF(tmp);
34054  tmp = ((PyObject*)p->nodeStarArray);
34055  p->nodeStarArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34056  Py_XDECREF(tmp);
34057  tmp = ((PyObject*)p->nodeStarOffsets);
34058  p->nodeStarOffsets = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34059  Py_XDECREF(tmp);
34060  tmp = ((PyObject*)p->elementMaterialTypes);
34061  p->elementMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34062  Py_XDECREF(tmp);
34063  tmp = ((PyObject*)p->elementBoundaryMaterialTypes);
34064  p->elementBoundaryMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34065  Py_XDECREF(tmp);
34066  tmp = ((PyObject*)p->nodeMaterialTypes);
34067  p->nodeMaterialTypes = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34068  Py_XDECREF(tmp);
34069  tmp = ((PyObject*)p->nodeArray);
34070  p->nodeArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34071  Py_XDECREF(tmp);
34072  tmp = ((PyObject*)p->elementIJK);
34073  p->elementIJK = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34074  Py_XDECREF(tmp);
34075  tmp = ((PyObject*)p->weights);
34076  p->weights = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34077  Py_XDECREF(tmp);
34078  tmp = ((PyObject*)p->U_KNOT);
34079  p->U_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34080  Py_XDECREF(tmp);
34081  tmp = ((PyObject*)p->V_KNOT);
34082  p->V_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34083  Py_XDECREF(tmp);
34084  tmp = ((PyObject*)p->W_KNOT);
34085  p->W_KNOT = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34086  Py_XDECREF(tmp);
34087  tmp = ((PyObject*)p->elementDiametersArray);
34088  p->elementDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34089  Py_XDECREF(tmp);
34090  tmp = ((PyObject*)p->elementInnerDiametersArray);
34091  p->elementInnerDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34092  Py_XDECREF(tmp);
34093  tmp = ((PyObject*)p->elementBoundaryDiametersArray);
34094  p->elementBoundaryDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34095  Py_XDECREF(tmp);
34096  tmp = ((PyObject*)p->elementBarycentersArray);
34097  p->elementBarycentersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34098  Py_XDECREF(tmp);
34099  tmp = ((PyObject*)p->elementBoundaryBarycentersArray);
34100  p->elementBoundaryBarycentersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34101  Py_XDECREF(tmp);
34102  tmp = ((PyObject*)p->nodeDiametersArray);
34103  p->nodeDiametersArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34104  Py_XDECREF(tmp);
34105  tmp = ((PyObject*)p->nodeSupportArray);
34106  p->nodeSupportArray = ((PyArrayObject *)Py_None); Py_INCREF(Py_None);
34107  Py_XDECREF(tmp);
34108  return 0;
34109 }
34110 
34111 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nElements_global(PyObject *o, CYTHON_UNUSED void *x) {
34112  return __pyx_pw_10cmeshTools_5CMesh_16nElements_global_1__get__(o);
34113 }
34114 
34115 static int __pyx_setprop_10cmeshTools_5CMesh_nElements_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34116  if (v) {
34117  return __pyx_pw_10cmeshTools_5CMesh_16nElements_global_3__set__(o, v);
34118  }
34119  else {
34120  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34121  return -1;
34122  }
34123 }
34124 
34125 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nNodes_global(PyObject *o, CYTHON_UNUSED void *x) {
34126  return __pyx_pw_10cmeshTools_5CMesh_13nNodes_global_1__get__(o);
34127 }
34128 
34129 static int __pyx_setprop_10cmeshTools_5CMesh_nNodes_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34130  if (v) {
34131  return __pyx_pw_10cmeshTools_5CMesh_13nNodes_global_3__set__(o, v);
34132  }
34133  else {
34134  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34135  return -1;
34136  }
34137 }
34138 
34139 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nNodes_element(PyObject *o, CYTHON_UNUSED void *x) {
34140  return __pyx_pw_10cmeshTools_5CMesh_14nNodes_element_1__get__(o);
34141 }
34142 
34143 static int __pyx_setprop_10cmeshTools_5CMesh_nNodes_element(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34144  if (v) {
34145  return __pyx_pw_10cmeshTools_5CMesh_14nNodes_element_3__set__(o, v);
34146  }
34147  else {
34148  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34149  return -1;
34150  }
34151 }
34152 
34153 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nNodes_elementBoundary(PyObject *o, CYTHON_UNUSED void *x) {
34154  return __pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_1__get__(o);
34155 }
34156 
34157 static int __pyx_setprop_10cmeshTools_5CMesh_nNodes_elementBoundary(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34158  if (v) {
34159  return __pyx_pw_10cmeshTools_5CMesh_22nNodes_elementBoundary_3__set__(o, v);
34160  }
34161  else {
34162  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34163  return -1;
34164  }
34165 }
34166 
34167 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nElementBoundaries_element(PyObject *o, CYTHON_UNUSED void *x) {
34168  return __pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_1__get__(o);
34169 }
34170 
34171 static int __pyx_setprop_10cmeshTools_5CMesh_nElementBoundaries_element(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34172  if (v) {
34173  return __pyx_pw_10cmeshTools_5CMesh_26nElementBoundaries_element_3__set__(o, v);
34174  }
34175  else {
34176  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34177  return -1;
34178  }
34179 }
34180 
34181 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nElementBoundaries_global(PyObject *o, CYTHON_UNUSED void *x) {
34182  return __pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_1__get__(o);
34183 }
34184 
34185 static int __pyx_setprop_10cmeshTools_5CMesh_nElementBoundaries_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34186  if (v) {
34187  return __pyx_pw_10cmeshTools_5CMesh_25nElementBoundaries_global_3__set__(o, v);
34188  }
34189  else {
34190  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34191  return -1;
34192  }
34193 }
34194 
34195 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nInteriorElementBoundaries_global(PyObject *o, CYTHON_UNUSED void *x) {
34196  return __pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_1__get__(o);
34197 }
34198 
34199 static int __pyx_setprop_10cmeshTools_5CMesh_nInteriorElementBoundaries_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34200  if (v) {
34201  return __pyx_pw_10cmeshTools_5CMesh_33nInteriorElementBoundaries_global_3__set__(o, v);
34202  }
34203  else {
34204  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34205  return -1;
34206  }
34207 }
34208 
34209 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nExteriorElementBoundaries_global(PyObject *o, CYTHON_UNUSED void *x) {
34210  return __pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_1__get__(o);
34211 }
34212 
34213 static int __pyx_setprop_10cmeshTools_5CMesh_nExteriorElementBoundaries_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34214  if (v) {
34215  return __pyx_pw_10cmeshTools_5CMesh_33nExteriorElementBoundaries_global_3__set__(o, v);
34216  }
34217  else {
34218  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34219  return -1;
34220  }
34221 }
34222 
34223 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_max_nElements_node(PyObject *o, CYTHON_UNUSED void *x) {
34224  return __pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_1__get__(o);
34225 }
34226 
34227 static int __pyx_setprop_10cmeshTools_5CMesh_max_nElements_node(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34228  if (v) {
34229  return __pyx_pw_10cmeshTools_5CMesh_18max_nElements_node_3__set__(o, v);
34230  }
34231  else {
34232  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34233  return -1;
34234  }
34235 }
34236 
34237 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nEdges_global(PyObject *o, CYTHON_UNUSED void *x) {
34238  return __pyx_pw_10cmeshTools_5CMesh_13nEdges_global_1__get__(o);
34239 }
34240 
34241 static int __pyx_setprop_10cmeshTools_5CMesh_nEdges_global(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34242  if (v) {
34243  return __pyx_pw_10cmeshTools_5CMesh_13nEdges_global_3__set__(o, v);
34244  }
34245  else {
34246  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34247  return -1;
34248  }
34249 }
34250 
34251 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_max_nNodeNeighbors_node(PyObject *o, CYTHON_UNUSED void *x) {
34252  return __pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_1__get__(o);
34253 }
34254 
34255 static int __pyx_setprop_10cmeshTools_5CMesh_max_nNodeNeighbors_node(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34256  if (v) {
34257  return __pyx_pw_10cmeshTools_5CMesh_23max_nNodeNeighbors_node_3__set__(o, v);
34258  }
34259  else {
34260  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34261  return -1;
34262  }
34263 }
34264 
34265 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementNodesArray(PyObject *o, CYTHON_UNUSED void *x) {
34266  return __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_1__get__(o);
34267 }
34268 
34269 static int __pyx_setprop_10cmeshTools_5CMesh_elementNodesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34270  if (v) {
34271  return __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_3__set__(o, v);
34272  }
34273  else {
34274  return __pyx_pw_10cmeshTools_5CMesh_17elementNodesArray_5__del__(o);
34275  }
34276 }
34277 
34278 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeElementsArray(PyObject *o, CYTHON_UNUSED void *x) {
34279  return __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_1__get__(o);
34280 }
34281 
34282 static int __pyx_setprop_10cmeshTools_5CMesh_nodeElementsArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34283  if (v) {
34284  return __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_3__set__(o, v);
34285  }
34286  else {
34287  return __pyx_pw_10cmeshTools_5CMesh_17nodeElementsArray_5__del__(o);
34288  }
34289 }
34290 
34291 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeElementOffsets(PyObject *o, CYTHON_UNUSED void *x) {
34292  return __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_1__get__(o);
34293 }
34294 
34295 static int __pyx_setprop_10cmeshTools_5CMesh_nodeElementOffsets(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34296  if (v) {
34297  return __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_3__set__(o, v);
34298  }
34299  else {
34300  return __pyx_pw_10cmeshTools_5CMesh_18nodeElementOffsets_5__del__(o);
34301  }
34302 }
34303 
34304 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementNeighborsArray(PyObject *o, CYTHON_UNUSED void *x) {
34305  return __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_1__get__(o);
34306 }
34307 
34308 static int __pyx_setprop_10cmeshTools_5CMesh_elementNeighborsArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34309  if (v) {
34310  return __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_3__set__(o, v);
34311  }
34312  else {
34313  return __pyx_pw_10cmeshTools_5CMesh_21elementNeighborsArray_5__del__(o);
34314  }
34315 }
34316 
34317 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundariesArray(PyObject *o, CYTHON_UNUSED void *x) {
34318  return __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_1__get__(o);
34319 }
34320 
34321 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundariesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34322  if (v) {
34323  return __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_3__set__(o, v);
34324  }
34325  else {
34326  return __pyx_pw_10cmeshTools_5CMesh_22elementBoundariesArray_5__del__(o);
34327  }
34328 }
34329 
34330 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryNodesArray(PyObject *o, CYTHON_UNUSED void *x) {
34331  return __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_1__get__(o);
34332 }
34333 
34334 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryNodesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34335  if (v) {
34336  return __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_3__set__(o, v);
34337  }
34338  else {
34339  return __pyx_pw_10cmeshTools_5CMesh_25elementBoundaryNodesArray_5__del__(o);
34340  }
34341 }
34342 
34343 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryElementsArray(PyObject *o, CYTHON_UNUSED void *x) {
34344  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_1__get__(o);
34345 }
34346 
34347 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryElementsArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34348  if (v) {
34349  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_3__set__(o, v);
34350  }
34351  else {
34352  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryElementsArray_5__del__(o);
34353  }
34354 }
34355 
34356 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryLocalElementBoundariesArray(PyObject *o, CYTHON_UNUSED void *x) {
34357  return __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_1__get__(o);
34358 }
34359 
34360 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryLocalElementBoundariesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34361  if (v) {
34362  return __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_3__set__(o, v);
34363  }
34364  else {
34365  return __pyx_pw_10cmeshTools_5CMesh_42elementBoundaryLocalElementBoundariesArray_5__del__(o);
34366  }
34367 }
34368 
34369 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_interiorElementBoundariesArray(PyObject *o, CYTHON_UNUSED void *x) {
34370  return __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_1__get__(o);
34371 }
34372 
34373 static int __pyx_setprop_10cmeshTools_5CMesh_interiorElementBoundariesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34374  if (v) {
34375  return __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_3__set__(o, v);
34376  }
34377  else {
34378  return __pyx_pw_10cmeshTools_5CMesh_30interiorElementBoundariesArray_5__del__(o);
34379  }
34380 }
34381 
34382 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_exteriorElementBoundariesArray(PyObject *o, CYTHON_UNUSED void *x) {
34383  return __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_1__get__(o);
34384 }
34385 
34386 static int __pyx_setprop_10cmeshTools_5CMesh_exteriorElementBoundariesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34387  if (v) {
34388  return __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_3__set__(o, v);
34389  }
34390  else {
34391  return __pyx_pw_10cmeshTools_5CMesh_30exteriorElementBoundariesArray_5__del__(o);
34392  }
34393 }
34394 
34395 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_edgeNodesArray(PyObject *o, CYTHON_UNUSED void *x) {
34396  return __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_1__get__(o);
34397 }
34398 
34399 static int __pyx_setprop_10cmeshTools_5CMesh_edgeNodesArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34400  if (v) {
34401  return __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_3__set__(o, v);
34402  }
34403  else {
34404  return __pyx_pw_10cmeshTools_5CMesh_14edgeNodesArray_5__del__(o);
34405  }
34406 }
34407 
34408 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeStarArray(PyObject *o, CYTHON_UNUSED void *x) {
34409  return __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_1__get__(o);
34410 }
34411 
34412 static int __pyx_setprop_10cmeshTools_5CMesh_nodeStarArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34413  if (v) {
34414  return __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_3__set__(o, v);
34415  }
34416  else {
34417  return __pyx_pw_10cmeshTools_5CMesh_13nodeStarArray_5__del__(o);
34418  }
34419 }
34420 
34421 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeStarOffsets(PyObject *o, CYTHON_UNUSED void *x) {
34422  return __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_1__get__(o);
34423 }
34424 
34425 static int __pyx_setprop_10cmeshTools_5CMesh_nodeStarOffsets(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34426  if (v) {
34427  return __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_3__set__(o, v);
34428  }
34429  else {
34430  return __pyx_pw_10cmeshTools_5CMesh_15nodeStarOffsets_5__del__(o);
34431  }
34432 }
34433 
34434 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementMaterialTypes(PyObject *o, CYTHON_UNUSED void *x) {
34435  return __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_1__get__(o);
34436 }
34437 
34438 static int __pyx_setprop_10cmeshTools_5CMesh_elementMaterialTypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34439  if (v) {
34440  return __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_3__set__(o, v);
34441  }
34442  else {
34443  return __pyx_pw_10cmeshTools_5CMesh_20elementMaterialTypes_5__del__(o);
34444  }
34445 }
34446 
34447 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryMaterialTypes(PyObject *o, CYTHON_UNUSED void *x) {
34448  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_1__get__(o);
34449 }
34450 
34451 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryMaterialTypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34452  if (v) {
34453  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_3__set__(o, v);
34454  }
34455  else {
34456  return __pyx_pw_10cmeshTools_5CMesh_28elementBoundaryMaterialTypes_5__del__(o);
34457  }
34458 }
34459 
34460 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeMaterialTypes(PyObject *o, CYTHON_UNUSED void *x) {
34461  return __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_1__get__(o);
34462 }
34463 
34464 static int __pyx_setprop_10cmeshTools_5CMesh_nodeMaterialTypes(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34465  if (v) {
34466  return __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_3__set__(o, v);
34467  }
34468  else {
34469  return __pyx_pw_10cmeshTools_5CMesh_17nodeMaterialTypes_5__del__(o);
34470  }
34471 }
34472 
34473 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeArray(PyObject *o, CYTHON_UNUSED void *x) {
34474  return __pyx_pw_10cmeshTools_5CMesh_9nodeArray_1__get__(o);
34475 }
34476 
34477 static int __pyx_setprop_10cmeshTools_5CMesh_nodeArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34478  if (v) {
34479  return __pyx_pw_10cmeshTools_5CMesh_9nodeArray_3__set__(o, v);
34480  }
34481  else {
34482  return __pyx_pw_10cmeshTools_5CMesh_9nodeArray_5__del__(o);
34483  }
34484 }
34485 
34486 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nx(PyObject *o, CYTHON_UNUSED void *x) {
34487  return __pyx_pw_10cmeshTools_5CMesh_2nx_1__get__(o);
34488 }
34489 
34490 static int __pyx_setprop_10cmeshTools_5CMesh_nx(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34491  if (v) {
34492  return __pyx_pw_10cmeshTools_5CMesh_2nx_3__set__(o, v);
34493  }
34494  else {
34495  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34496  return -1;
34497  }
34498 }
34499 
34500 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_ny(PyObject *o, CYTHON_UNUSED void *x) {
34501  return __pyx_pw_10cmeshTools_5CMesh_2ny_1__get__(o);
34502 }
34503 
34504 static int __pyx_setprop_10cmeshTools_5CMesh_ny(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34505  if (v) {
34506  return __pyx_pw_10cmeshTools_5CMesh_2ny_3__set__(o, v);
34507  }
34508  else {
34509  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34510  return -1;
34511  }
34512 }
34513 
34514 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nz(PyObject *o, CYTHON_UNUSED void *x) {
34515  return __pyx_pw_10cmeshTools_5CMesh_2nz_1__get__(o);
34516 }
34517 
34518 static int __pyx_setprop_10cmeshTools_5CMesh_nz(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34519  if (v) {
34520  return __pyx_pw_10cmeshTools_5CMesh_2nz_3__set__(o, v);
34521  }
34522  else {
34523  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34524  return -1;
34525  }
34526 }
34527 
34528 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_px(PyObject *o, CYTHON_UNUSED void *x) {
34529  return __pyx_pw_10cmeshTools_5CMesh_2px_1__get__(o);
34530 }
34531 
34532 static int __pyx_setprop_10cmeshTools_5CMesh_px(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34533  if (v) {
34534  return __pyx_pw_10cmeshTools_5CMesh_2px_3__set__(o, v);
34535  }
34536  else {
34537  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34538  return -1;
34539  }
34540 }
34541 
34542 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_py(PyObject *o, CYTHON_UNUSED void *x) {
34543  return __pyx_pw_10cmeshTools_5CMesh_2py_1__get__(o);
34544 }
34545 
34546 static int __pyx_setprop_10cmeshTools_5CMesh_py(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34547  if (v) {
34548  return __pyx_pw_10cmeshTools_5CMesh_2py_3__set__(o, v);
34549  }
34550  else {
34551  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34552  return -1;
34553  }
34554 }
34555 
34556 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_pz(PyObject *o, CYTHON_UNUSED void *x) {
34557  return __pyx_pw_10cmeshTools_5CMesh_2pz_1__get__(o);
34558 }
34559 
34560 static int __pyx_setprop_10cmeshTools_5CMesh_pz(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34561  if (v) {
34562  return __pyx_pw_10cmeshTools_5CMesh_2pz_3__set__(o, v);
34563  }
34564  else {
34565  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34566  return -1;
34567  }
34568 }
34569 
34570 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementIJK(PyObject *o, CYTHON_UNUSED void *x) {
34571  return __pyx_pw_10cmeshTools_5CMesh_10elementIJK_1__get__(o);
34572 }
34573 
34574 static int __pyx_setprop_10cmeshTools_5CMesh_elementIJK(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34575  if (v) {
34576  return __pyx_pw_10cmeshTools_5CMesh_10elementIJK_3__set__(o, v);
34577  }
34578  else {
34579  return __pyx_pw_10cmeshTools_5CMesh_10elementIJK_5__del__(o);
34580  }
34581 }
34582 
34583 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_weights(PyObject *o, CYTHON_UNUSED void *x) {
34584  return __pyx_pw_10cmeshTools_5CMesh_7weights_1__get__(o);
34585 }
34586 
34587 static int __pyx_setprop_10cmeshTools_5CMesh_weights(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34588  if (v) {
34589  return __pyx_pw_10cmeshTools_5CMesh_7weights_3__set__(o, v);
34590  }
34591  else {
34592  return __pyx_pw_10cmeshTools_5CMesh_7weights_5__del__(o);
34593  }
34594 }
34595 
34596 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_U_KNOT(PyObject *o, CYTHON_UNUSED void *x) {
34597  return __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_1__get__(o);
34598 }
34599 
34600 static int __pyx_setprop_10cmeshTools_5CMesh_U_KNOT(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34601  if (v) {
34602  return __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_3__set__(o, v);
34603  }
34604  else {
34605  return __pyx_pw_10cmeshTools_5CMesh_6U_KNOT_5__del__(o);
34606  }
34607 }
34608 
34609 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_V_KNOT(PyObject *o, CYTHON_UNUSED void *x) {
34610  return __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_1__get__(o);
34611 }
34612 
34613 static int __pyx_setprop_10cmeshTools_5CMesh_V_KNOT(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34614  if (v) {
34615  return __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_3__set__(o, v);
34616  }
34617  else {
34618  return __pyx_pw_10cmeshTools_5CMesh_6V_KNOT_5__del__(o);
34619  }
34620 }
34621 
34622 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_W_KNOT(PyObject *o, CYTHON_UNUSED void *x) {
34623  return __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_1__get__(o);
34624 }
34625 
34626 static int __pyx_setprop_10cmeshTools_5CMesh_W_KNOT(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34627  if (v) {
34628  return __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_3__set__(o, v);
34629  }
34630  else {
34631  return __pyx_pw_10cmeshTools_5CMesh_6W_KNOT_5__del__(o);
34632  }
34633 }
34634 
34635 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementDiametersArray(PyObject *o, CYTHON_UNUSED void *x) {
34636  return __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_1__get__(o);
34637 }
34638 
34639 static int __pyx_setprop_10cmeshTools_5CMesh_elementDiametersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34640  if (v) {
34641  return __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_3__set__(o, v);
34642  }
34643  else {
34644  return __pyx_pw_10cmeshTools_5CMesh_21elementDiametersArray_5__del__(o);
34645  }
34646 }
34647 
34648 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementInnerDiametersArray(PyObject *o, CYTHON_UNUSED void *x) {
34649  return __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_1__get__(o);
34650 }
34651 
34652 static int __pyx_setprop_10cmeshTools_5CMesh_elementInnerDiametersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34653  if (v) {
34654  return __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_3__set__(o, v);
34655  }
34656  else {
34657  return __pyx_pw_10cmeshTools_5CMesh_26elementInnerDiametersArray_5__del__(o);
34658  }
34659 }
34660 
34661 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryDiametersArray(PyObject *o, CYTHON_UNUSED void *x) {
34662  return __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_1__get__(o);
34663 }
34664 
34665 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryDiametersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34666  if (v) {
34667  return __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_3__set__(o, v);
34668  }
34669  else {
34670  return __pyx_pw_10cmeshTools_5CMesh_29elementBoundaryDiametersArray_5__del__(o);
34671  }
34672 }
34673 
34674 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBarycentersArray(PyObject *o, CYTHON_UNUSED void *x) {
34675  return __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_1__get__(o);
34676 }
34677 
34678 static int __pyx_setprop_10cmeshTools_5CMesh_elementBarycentersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34679  if (v) {
34680  return __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_3__set__(o, v);
34681  }
34682  else {
34683  return __pyx_pw_10cmeshTools_5CMesh_23elementBarycentersArray_5__del__(o);
34684  }
34685 }
34686 
34687 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_elementBoundaryBarycentersArray(PyObject *o, CYTHON_UNUSED void *x) {
34688  return __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_1__get__(o);
34689 }
34690 
34691 static int __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryBarycentersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34692  if (v) {
34693  return __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_3__set__(o, v);
34694  }
34695  else {
34696  return __pyx_pw_10cmeshTools_5CMesh_31elementBoundaryBarycentersArray_5__del__(o);
34697  }
34698 }
34699 
34700 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeDiametersArray(PyObject *o, CYTHON_UNUSED void *x) {
34701  return __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_1__get__(o);
34702 }
34703 
34704 static int __pyx_setprop_10cmeshTools_5CMesh_nodeDiametersArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34705  if (v) {
34706  return __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_3__set__(o, v);
34707  }
34708  else {
34709  return __pyx_pw_10cmeshTools_5CMesh_18nodeDiametersArray_5__del__(o);
34710  }
34711 }
34712 
34713 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_nodeSupportArray(PyObject *o, CYTHON_UNUSED void *x) {
34714  return __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_1__get__(o);
34715 }
34716 
34717 static int __pyx_setprop_10cmeshTools_5CMesh_nodeSupportArray(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34718  if (v) {
34719  return __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_3__set__(o, v);
34720  }
34721  else {
34722  return __pyx_pw_10cmeshTools_5CMesh_16nodeSupportArray_5__del__(o);
34723  }
34724 }
34725 
34726 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_h(PyObject *o, CYTHON_UNUSED void *x) {
34727  return __pyx_pw_10cmeshTools_5CMesh_1h_1__get__(o);
34728 }
34729 
34730 static int __pyx_setprop_10cmeshTools_5CMesh_h(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34731  if (v) {
34732  return __pyx_pw_10cmeshTools_5CMesh_1h_3__set__(o, v);
34733  }
34734  else {
34735  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34736  return -1;
34737  }
34738 }
34739 
34740 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_hMin(PyObject *o, CYTHON_UNUSED void *x) {
34741  return __pyx_pw_10cmeshTools_5CMesh_4hMin_1__get__(o);
34742 }
34743 
34744 static int __pyx_setprop_10cmeshTools_5CMesh_hMin(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34745  if (v) {
34746  return __pyx_pw_10cmeshTools_5CMesh_4hMin_3__set__(o, v);
34747  }
34748  else {
34749  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34750  return -1;
34751  }
34752 }
34753 
34754 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_sigmaMax(PyObject *o, CYTHON_UNUSED void *x) {
34755  return __pyx_pw_10cmeshTools_5CMesh_8sigmaMax_1__get__(o);
34756 }
34757 
34758 static int __pyx_setprop_10cmeshTools_5CMesh_sigmaMax(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34759  if (v) {
34760  return __pyx_pw_10cmeshTools_5CMesh_8sigmaMax_3__set__(o, v);
34761  }
34762  else {
34763  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34764  return -1;
34765  }
34766 }
34767 
34768 static PyObject *__pyx_getprop_10cmeshTools_5CMesh_volume(PyObject *o, CYTHON_UNUSED void *x) {
34769  return __pyx_pw_10cmeshTools_5CMesh_6volume_1__get__(o);
34770 }
34771 
34772 static int __pyx_setprop_10cmeshTools_5CMesh_volume(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34773  if (v) {
34774  return __pyx_pw_10cmeshTools_5CMesh_6volume_3__set__(o, v);
34775  }
34776  else {
34777  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34778  return -1;
34779  }
34780 }
34781 
34782 static PyMethodDef __pyx_methods_10cmeshTools_CMesh[] = {
34783  {"buildPythonMeshInterface", (PyCFunction)__pyx_pw_10cmeshTools_5CMesh_3buildPythonMeshInterface, METH_NOARGS, 0},
34784  {"buildPythonMeshInterfaceNoArrays", (PyCFunction)__pyx_pw_10cmeshTools_5CMesh_5buildPythonMeshInterfaceNoArrays, METH_NOARGS, 0},
34785  {"__reduce_cython__", (PyCFunction)__pyx_pw_10cmeshTools_5CMesh_7__reduce_cython__, METH_NOARGS, 0},
34786  {"__setstate_cython__", (PyCFunction)__pyx_pw_10cmeshTools_5CMesh_9__setstate_cython__, METH_O, 0},
34787  {0, 0, 0, 0}
34788 };
34789 
34790 static struct PyGetSetDef __pyx_getsets_10cmeshTools_CMesh[] = {
34791  {(char *)"nElements_global", __pyx_getprop_10cmeshTools_5CMesh_nElements_global, __pyx_setprop_10cmeshTools_5CMesh_nElements_global, (char *)0, 0},
34792  {(char *)"nNodes_global", __pyx_getprop_10cmeshTools_5CMesh_nNodes_global, __pyx_setprop_10cmeshTools_5CMesh_nNodes_global, (char *)0, 0},
34793  {(char *)"nNodes_element", __pyx_getprop_10cmeshTools_5CMesh_nNodes_element, __pyx_setprop_10cmeshTools_5CMesh_nNodes_element, (char *)0, 0},
34794  {(char *)"nNodes_elementBoundary", __pyx_getprop_10cmeshTools_5CMesh_nNodes_elementBoundary, __pyx_setprop_10cmeshTools_5CMesh_nNodes_elementBoundary, (char *)0, 0},
34795  {(char *)"nElementBoundaries_element", __pyx_getprop_10cmeshTools_5CMesh_nElementBoundaries_element, __pyx_setprop_10cmeshTools_5CMesh_nElementBoundaries_element, (char *)0, 0},
34796  {(char *)"nElementBoundaries_global", __pyx_getprop_10cmeshTools_5CMesh_nElementBoundaries_global, __pyx_setprop_10cmeshTools_5CMesh_nElementBoundaries_global, (char *)0, 0},
34797  {(char *)"nInteriorElementBoundaries_global", __pyx_getprop_10cmeshTools_5CMesh_nInteriorElementBoundaries_global, __pyx_setprop_10cmeshTools_5CMesh_nInteriorElementBoundaries_global, (char *)0, 0},
34798  {(char *)"nExteriorElementBoundaries_global", __pyx_getprop_10cmeshTools_5CMesh_nExteriorElementBoundaries_global, __pyx_setprop_10cmeshTools_5CMesh_nExteriorElementBoundaries_global, (char *)0, 0},
34799  {(char *)"max_nElements_node", __pyx_getprop_10cmeshTools_5CMesh_max_nElements_node, __pyx_setprop_10cmeshTools_5CMesh_max_nElements_node, (char *)0, 0},
34800  {(char *)"nEdges_global", __pyx_getprop_10cmeshTools_5CMesh_nEdges_global, __pyx_setprop_10cmeshTools_5CMesh_nEdges_global, (char *)0, 0},
34801  {(char *)"max_nNodeNeighbors_node", __pyx_getprop_10cmeshTools_5CMesh_max_nNodeNeighbors_node, __pyx_setprop_10cmeshTools_5CMesh_max_nNodeNeighbors_node, (char *)0, 0},
34802  {(char *)"elementNodesArray", __pyx_getprop_10cmeshTools_5CMesh_elementNodesArray, __pyx_setprop_10cmeshTools_5CMesh_elementNodesArray, (char *)0, 0},
34803  {(char *)"nodeElementsArray", __pyx_getprop_10cmeshTools_5CMesh_nodeElementsArray, __pyx_setprop_10cmeshTools_5CMesh_nodeElementsArray, (char *)0, 0},
34804  {(char *)"nodeElementOffsets", __pyx_getprop_10cmeshTools_5CMesh_nodeElementOffsets, __pyx_setprop_10cmeshTools_5CMesh_nodeElementOffsets, (char *)0, 0},
34805  {(char *)"elementNeighborsArray", __pyx_getprop_10cmeshTools_5CMesh_elementNeighborsArray, __pyx_setprop_10cmeshTools_5CMesh_elementNeighborsArray, (char *)0, 0},
34806  {(char *)"elementBoundariesArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundariesArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundariesArray, (char *)0, 0},
34807  {(char *)"elementBoundaryNodesArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryNodesArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryNodesArray, (char *)0, 0},
34808  {(char *)"elementBoundaryElementsArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryElementsArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryElementsArray, (char *)0, 0},
34809  {(char *)"elementBoundaryLocalElementBoundariesArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryLocalElementBoundariesArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryLocalElementBoundariesArray, (char *)0, 0},
34810  {(char *)"interiorElementBoundariesArray", __pyx_getprop_10cmeshTools_5CMesh_interiorElementBoundariesArray, __pyx_setprop_10cmeshTools_5CMesh_interiorElementBoundariesArray, (char *)0, 0},
34811  {(char *)"exteriorElementBoundariesArray", __pyx_getprop_10cmeshTools_5CMesh_exteriorElementBoundariesArray, __pyx_setprop_10cmeshTools_5CMesh_exteriorElementBoundariesArray, (char *)0, 0},
34812  {(char *)"edgeNodesArray", __pyx_getprop_10cmeshTools_5CMesh_edgeNodesArray, __pyx_setprop_10cmeshTools_5CMesh_edgeNodesArray, (char *)0, 0},
34813  {(char *)"nodeStarArray", __pyx_getprop_10cmeshTools_5CMesh_nodeStarArray, __pyx_setprop_10cmeshTools_5CMesh_nodeStarArray, (char *)0, 0},
34814  {(char *)"nodeStarOffsets", __pyx_getprop_10cmeshTools_5CMesh_nodeStarOffsets, __pyx_setprop_10cmeshTools_5CMesh_nodeStarOffsets, (char *)0, 0},
34815  {(char *)"elementMaterialTypes", __pyx_getprop_10cmeshTools_5CMesh_elementMaterialTypes, __pyx_setprop_10cmeshTools_5CMesh_elementMaterialTypes, (char *)0, 0},
34816  {(char *)"elementBoundaryMaterialTypes", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryMaterialTypes, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryMaterialTypes, (char *)0, 0},
34817  {(char *)"nodeMaterialTypes", __pyx_getprop_10cmeshTools_5CMesh_nodeMaterialTypes, __pyx_setprop_10cmeshTools_5CMesh_nodeMaterialTypes, (char *)0, 0},
34818  {(char *)"nodeArray", __pyx_getprop_10cmeshTools_5CMesh_nodeArray, __pyx_setprop_10cmeshTools_5CMesh_nodeArray, (char *)0, 0},
34819  {(char *)"nx", __pyx_getprop_10cmeshTools_5CMesh_nx, __pyx_setprop_10cmeshTools_5CMesh_nx, (char *)0, 0},
34820  {(char *)"ny", __pyx_getprop_10cmeshTools_5CMesh_ny, __pyx_setprop_10cmeshTools_5CMesh_ny, (char *)0, 0},
34821  {(char *)"nz", __pyx_getprop_10cmeshTools_5CMesh_nz, __pyx_setprop_10cmeshTools_5CMesh_nz, (char *)0, 0},
34822  {(char *)"px", __pyx_getprop_10cmeshTools_5CMesh_px, __pyx_setprop_10cmeshTools_5CMesh_px, (char *)0, 0},
34823  {(char *)"py", __pyx_getprop_10cmeshTools_5CMesh_py, __pyx_setprop_10cmeshTools_5CMesh_py, (char *)0, 0},
34824  {(char *)"pz", __pyx_getprop_10cmeshTools_5CMesh_pz, __pyx_setprop_10cmeshTools_5CMesh_pz, (char *)0, 0},
34825  {(char *)"elementIJK", __pyx_getprop_10cmeshTools_5CMesh_elementIJK, __pyx_setprop_10cmeshTools_5CMesh_elementIJK, (char *)0, 0},
34826  {(char *)"weights", __pyx_getprop_10cmeshTools_5CMesh_weights, __pyx_setprop_10cmeshTools_5CMesh_weights, (char *)0, 0},
34827  {(char *)"U_KNOT", __pyx_getprop_10cmeshTools_5CMesh_U_KNOT, __pyx_setprop_10cmeshTools_5CMesh_U_KNOT, (char *)0, 0},
34828  {(char *)"V_KNOT", __pyx_getprop_10cmeshTools_5CMesh_V_KNOT, __pyx_setprop_10cmeshTools_5CMesh_V_KNOT, (char *)0, 0},
34829  {(char *)"W_KNOT", __pyx_getprop_10cmeshTools_5CMesh_W_KNOT, __pyx_setprop_10cmeshTools_5CMesh_W_KNOT, (char *)0, 0},
34830  {(char *)"elementDiametersArray", __pyx_getprop_10cmeshTools_5CMesh_elementDiametersArray, __pyx_setprop_10cmeshTools_5CMesh_elementDiametersArray, (char *)0, 0},
34831  {(char *)"elementInnerDiametersArray", __pyx_getprop_10cmeshTools_5CMesh_elementInnerDiametersArray, __pyx_setprop_10cmeshTools_5CMesh_elementInnerDiametersArray, (char *)0, 0},
34832  {(char *)"elementBoundaryDiametersArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryDiametersArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryDiametersArray, (char *)0, 0},
34833  {(char *)"elementBarycentersArray", __pyx_getprop_10cmeshTools_5CMesh_elementBarycentersArray, __pyx_setprop_10cmeshTools_5CMesh_elementBarycentersArray, (char *)0, 0},
34834  {(char *)"elementBoundaryBarycentersArray", __pyx_getprop_10cmeshTools_5CMesh_elementBoundaryBarycentersArray, __pyx_setprop_10cmeshTools_5CMesh_elementBoundaryBarycentersArray, (char *)0, 0},
34835  {(char *)"nodeDiametersArray", __pyx_getprop_10cmeshTools_5CMesh_nodeDiametersArray, __pyx_setprop_10cmeshTools_5CMesh_nodeDiametersArray, (char *)0, 0},
34836  {(char *)"nodeSupportArray", __pyx_getprop_10cmeshTools_5CMesh_nodeSupportArray, __pyx_setprop_10cmeshTools_5CMesh_nodeSupportArray, (char *)0, 0},
34837  {(char *)"h", __pyx_getprop_10cmeshTools_5CMesh_h, __pyx_setprop_10cmeshTools_5CMesh_h, (char *)0, 0},
34838  {(char *)"hMin", __pyx_getprop_10cmeshTools_5CMesh_hMin, __pyx_setprop_10cmeshTools_5CMesh_hMin, (char *)0, 0},
34839  {(char *)"sigmaMax", __pyx_getprop_10cmeshTools_5CMesh_sigmaMax, __pyx_setprop_10cmeshTools_5CMesh_sigmaMax, (char *)0, 0},
34840  {(char *)"volume", __pyx_getprop_10cmeshTools_5CMesh_volume, __pyx_setprop_10cmeshTools_5CMesh_volume, (char *)0, 0},
34841  {0, 0, 0, 0, 0}
34842 };
34843 
34844 static PyTypeObject __pyx_type_10cmeshTools_CMesh = {
34845  PyVarObject_HEAD_INIT(0, 0)
34846  "cmeshTools.CMesh", /*tp_name*/
34847  sizeof(struct __pyx_obj_10cmeshTools_CMesh), /*tp_basicsize*/
34848  0, /*tp_itemsize*/
34849  __pyx_tp_dealloc_10cmeshTools_CMesh, /*tp_dealloc*/
34850  0, /*tp_print*/
34851  0, /*tp_getattr*/
34852  0, /*tp_setattr*/
34853  #if PY_MAJOR_VERSION < 3
34854  0, /*tp_compare*/
34855  #endif
34856  #if PY_MAJOR_VERSION >= 3
34857  0, /*tp_as_async*/
34858  #endif
34859  0, /*tp_repr*/
34860  0, /*tp_as_number*/
34861  0, /*tp_as_sequence*/
34862  0, /*tp_as_mapping*/
34863  0, /*tp_hash*/
34864  0, /*tp_call*/
34865  0, /*tp_str*/
34866  0, /*tp_getattro*/
34867  0, /*tp_setattro*/
34868  0, /*tp_as_buffer*/
34869  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
34870  0, /*tp_doc*/
34871  __pyx_tp_traverse_10cmeshTools_CMesh, /*tp_traverse*/
34872  __pyx_tp_clear_10cmeshTools_CMesh, /*tp_clear*/
34873  0, /*tp_richcompare*/
34874  0, /*tp_weaklistoffset*/
34875  0, /*tp_iter*/
34876  0, /*tp_iternext*/
34877  __pyx_methods_10cmeshTools_CMesh, /*tp_methods*/
34878  0, /*tp_members*/
34879  __pyx_getsets_10cmeshTools_CMesh, /*tp_getset*/
34880  0, /*tp_base*/
34881  0, /*tp_dict*/
34882  0, /*tp_descr_get*/
34883  0, /*tp_descr_set*/
34884  0, /*tp_dictoffset*/
34885  __pyx_pw_10cmeshTools_5CMesh_1__init__, /*tp_init*/
34886  0, /*tp_alloc*/
34887  __pyx_tp_new_10cmeshTools_CMesh, /*tp_new*/
34888  0, /*tp_free*/
34889  0, /*tp_is_gc*/
34890  0, /*tp_bases*/
34891  0, /*tp_mro*/
34892  0, /*tp_cache*/
34893  0, /*tp_subclasses*/
34894  0, /*tp_weaklist*/
34895  0, /*tp_del*/
34896  0, /*tp_version_tag*/
34897  #if PY_VERSION_HEX >= 0x030400a1
34898  0, /*tp_finalize*/
34899  #endif
34900 };
34901 
34902 static PyObject *__pyx_tp_new_10cmeshTools_CMultilevelMesh(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
34903  struct __pyx_obj_10cmeshTools_CMultilevelMesh *p;
34904  PyObject *o;
34905  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
34906  o = (*t->tp_alloc)(t, 0);
34907  } else {
34908  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
34909  }
34910  if (unlikely(!o)) return 0;
34911  p = ((struct __pyx_obj_10cmeshTools_CMultilevelMesh *)o);
34912  p->cmeshList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34913  p->elementParentsArrayList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34914  p->elementChildrenArrayList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34915  p->elementChildrenOffsetsList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34916  return o;
34917 }
34918 
34919 static void __pyx_tp_dealloc_10cmeshTools_CMultilevelMesh(PyObject *o) {
34920  struct __pyx_obj_10cmeshTools_CMultilevelMesh *p = (struct __pyx_obj_10cmeshTools_CMultilevelMesh *)o;
34921  #if CYTHON_USE_TP_FINALIZE
34922  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
34923  if (PyObject_CallFinalizerFromDealloc(o)) return;
34924  }
34925  #endif
34926  PyObject_GC_UnTrack(o);
34927  Py_CLEAR(p->cmeshList);
34928  Py_CLEAR(p->elementParentsArrayList);
34929  Py_CLEAR(p->elementChildrenArrayList);
34930  Py_CLEAR(p->elementChildrenOffsetsList);
34931  (*Py_TYPE(o)->tp_free)(o);
34932 }
34933 
34934 static int __pyx_tp_traverse_10cmeshTools_CMultilevelMesh(PyObject *o, visitproc v, void *a) {
34935  int e;
34936  struct __pyx_obj_10cmeshTools_CMultilevelMesh *p = (struct __pyx_obj_10cmeshTools_CMultilevelMesh *)o;
34937  if (p->cmeshList) {
34938  e = (*v)(p->cmeshList, a); if (e) return e;
34939  }
34940  if (p->elementParentsArrayList) {
34941  e = (*v)(p->elementParentsArrayList, a); if (e) return e;
34942  }
34943  if (p->elementChildrenArrayList) {
34944  e = (*v)(p->elementChildrenArrayList, a); if (e) return e;
34945  }
34946  if (p->elementChildrenOffsetsList) {
34947  e = (*v)(p->elementChildrenOffsetsList, a); if (e) return e;
34948  }
34949  return 0;
34950 }
34951 
34952 static int __pyx_tp_clear_10cmeshTools_CMultilevelMesh(PyObject *o) {
34953  PyObject* tmp;
34954  struct __pyx_obj_10cmeshTools_CMultilevelMesh *p = (struct __pyx_obj_10cmeshTools_CMultilevelMesh *)o;
34955  tmp = ((PyObject*)p->cmeshList);
34956  p->cmeshList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34957  Py_XDECREF(tmp);
34958  tmp = ((PyObject*)p->elementParentsArrayList);
34959  p->elementParentsArrayList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34960  Py_XDECREF(tmp);
34961  tmp = ((PyObject*)p->elementChildrenArrayList);
34962  p->elementChildrenArrayList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34963  Py_XDECREF(tmp);
34964  tmp = ((PyObject*)p->elementChildrenOffsetsList);
34965  p->elementChildrenOffsetsList = ((PyObject*)Py_None); Py_INCREF(Py_None);
34966  Py_XDECREF(tmp);
34967  return 0;
34968 }
34969 
34970 static PyObject *__pyx_getprop_10cmeshTools_15CMultilevelMesh_nLevels(PyObject *o, CYTHON_UNUSED void *x) {
34971  return __pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_1__get__(o);
34972 }
34973 
34974 static int __pyx_setprop_10cmeshTools_15CMultilevelMesh_nLevels(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34975  if (v) {
34976  return __pyx_pw_10cmeshTools_15CMultilevelMesh_7nLevels_3__set__(o, v);
34977  }
34978  else {
34979  PyErr_SetString(PyExc_NotImplementedError, "__del__");
34980  return -1;
34981  }
34982 }
34983 
34984 static PyObject *__pyx_getprop_10cmeshTools_15CMultilevelMesh_cmeshList(PyObject *o, CYTHON_UNUSED void *x) {
34985  return __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_1__get__(o);
34986 }
34987 
34988 static int __pyx_setprop_10cmeshTools_15CMultilevelMesh_cmeshList(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
34989  if (v) {
34990  return __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_3__set__(o, v);
34991  }
34992  else {
34993  return __pyx_pw_10cmeshTools_15CMultilevelMesh_9cmeshList_5__del__(o);
34994  }
34995 }
34996 
34997 static PyObject *__pyx_getprop_10cmeshTools_15CMultilevelMesh_elementParentsArrayList(PyObject *o, CYTHON_UNUSED void *x) {
34998  return __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_1__get__(o);
34999 }
35000 
35001 static int __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementParentsArrayList(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
35002  if (v) {
35003  return __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_3__set__(o, v);
35004  }
35005  else {
35006  return __pyx_pw_10cmeshTools_15CMultilevelMesh_23elementParentsArrayList_5__del__(o);
35007  }
35008 }
35009 
35010 static PyObject *__pyx_getprop_10cmeshTools_15CMultilevelMesh_elementChildrenArrayList(PyObject *o, CYTHON_UNUSED void *x) {
35011  return __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_1__get__(o);
35012 }
35013 
35014 static int __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementChildrenArrayList(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
35015  if (v) {
35016  return __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_3__set__(o, v);
35017  }
35018  else {
35019  return __pyx_pw_10cmeshTools_15CMultilevelMesh_24elementChildrenArrayList_5__del__(o);
35020  }
35021 }
35022 
35023 static PyObject *__pyx_getprop_10cmeshTools_15CMultilevelMesh_elementChildrenOffsetsList(PyObject *o, CYTHON_UNUSED void *x) {
35024  return __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_1__get__(o);
35025 }
35026 
35027 static int __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementChildrenOffsetsList(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
35028  if (v) {
35029  return __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_3__set__(o, v);
35030  }
35031  else {
35032  return __pyx_pw_10cmeshTools_15CMultilevelMesh_26elementChildrenOffsetsList_5__del__(o);
35033  }
35034 }
35035 
35036 static PyMethodDef __pyx_methods_10cmeshTools_CMultilevelMesh[] = {
35037  {"buildPythonMultilevelMeshInterface", (PyCFunction)__pyx_pw_10cmeshTools_15CMultilevelMesh_3buildPythonMultilevelMeshInterface, METH_NOARGS, 0},
35038  {"__reduce_cython__", (PyCFunction)__pyx_pw_10cmeshTools_15CMultilevelMesh_5__reduce_cython__, METH_NOARGS, 0},
35039  {"__setstate_cython__", (PyCFunction)__pyx_pw_10cmeshTools_15CMultilevelMesh_7__setstate_cython__, METH_O, 0},
35040  {0, 0, 0, 0}
35041 };
35042 
35043 static struct PyGetSetDef __pyx_getsets_10cmeshTools_CMultilevelMesh[] = {
35044  {(char *)"nLevels", __pyx_getprop_10cmeshTools_15CMultilevelMesh_nLevels, __pyx_setprop_10cmeshTools_15CMultilevelMesh_nLevels, (char *)0, 0},
35045  {(char *)"cmeshList", __pyx_getprop_10cmeshTools_15CMultilevelMesh_cmeshList, __pyx_setprop_10cmeshTools_15CMultilevelMesh_cmeshList, (char *)0, 0},
35046  {(char *)"elementParentsArrayList", __pyx_getprop_10cmeshTools_15CMultilevelMesh_elementParentsArrayList, __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementParentsArrayList, (char *)0, 0},
35047  {(char *)"elementChildrenArrayList", __pyx_getprop_10cmeshTools_15CMultilevelMesh_elementChildrenArrayList, __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementChildrenArrayList, (char *)0, 0},
35048  {(char *)"elementChildrenOffsetsList", __pyx_getprop_10cmeshTools_15CMultilevelMesh_elementChildrenOffsetsList, __pyx_setprop_10cmeshTools_15CMultilevelMesh_elementChildrenOffsetsList, (char *)0, 0},
35049  {0, 0, 0, 0, 0}
35050 };
35051 
35052 static PyTypeObject __pyx_type_10cmeshTools_CMultilevelMesh = {
35053  PyVarObject_HEAD_INIT(0, 0)
35054  "cmeshTools.CMultilevelMesh", /*tp_name*/
35055  sizeof(struct __pyx_obj_10cmeshTools_CMultilevelMesh), /*tp_basicsize*/
35056  0, /*tp_itemsize*/
35057  __pyx_tp_dealloc_10cmeshTools_CMultilevelMesh, /*tp_dealloc*/
35058  0, /*tp_print*/
35059  0, /*tp_getattr*/
35060  0, /*tp_setattr*/
35061  #if PY_MAJOR_VERSION < 3
35062  0, /*tp_compare*/
35063  #endif
35064  #if PY_MAJOR_VERSION >= 3
35065  0, /*tp_as_async*/
35066  #endif
35067  0, /*tp_repr*/
35068  0, /*tp_as_number*/
35069  0, /*tp_as_sequence*/
35070  0, /*tp_as_mapping*/
35071  0, /*tp_hash*/
35072  0, /*tp_call*/
35073  0, /*tp_str*/
35074  0, /*tp_getattro*/
35075  0, /*tp_setattro*/
35076  0, /*tp_as_buffer*/
35077  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
35078  0, /*tp_doc*/
35079  __pyx_tp_traverse_10cmeshTools_CMultilevelMesh, /*tp_traverse*/
35080  __pyx_tp_clear_10cmeshTools_CMultilevelMesh, /*tp_clear*/
35081  0, /*tp_richcompare*/
35082  0, /*tp_weaklistoffset*/
35083  0, /*tp_iter*/
35084  0, /*tp_iternext*/
35085  __pyx_methods_10cmeshTools_CMultilevelMesh, /*tp_methods*/
35086  0, /*tp_members*/
35087  __pyx_getsets_10cmeshTools_CMultilevelMesh, /*tp_getset*/
35088  0, /*tp_base*/
35089  0, /*tp_dict*/
35090  0, /*tp_descr_get*/
35091  0, /*tp_descr_set*/
35092  0, /*tp_dictoffset*/
35093  __pyx_pw_10cmeshTools_15CMultilevelMesh_1__init__, /*tp_init*/
35094  0, /*tp_alloc*/
35095  __pyx_tp_new_10cmeshTools_CMultilevelMesh, /*tp_new*/
35096  0, /*tp_free*/
35097  0, /*tp_is_gc*/
35098  0, /*tp_bases*/
35099  0, /*tp_mro*/
35100  0, /*tp_cache*/
35101  0, /*tp_subclasses*/
35102  0, /*tp_weaklist*/
35103  0, /*tp_del*/
35104  0, /*tp_version_tag*/
35105  #if PY_VERSION_HEX >= 0x030400a1
35106  0, /*tp_finalize*/
35107  #endif
35108 };
35109 static struct __pyx_vtabstruct_array __pyx_vtable_array;
35110 
35111 static PyObject *__pyx_tp_new_array(PyTypeObject *t, PyObject *a, PyObject *k) {
35112  struct __pyx_array_obj *p;
35113  PyObject *o;
35114  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
35115  o = (*t->tp_alloc)(t, 0);
35116  } else {
35117  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
35118  }
35119  if (unlikely(!o)) return 0;
35120  p = ((struct __pyx_array_obj *)o);
35121  p->__pyx_vtab = __pyx_vtabptr_array;
35122  p->mode = ((PyObject*)Py_None); Py_INCREF(Py_None);
35123  p->_format = ((PyObject*)Py_None); Py_INCREF(Py_None);
35124  if (unlikely(__pyx_array___cinit__(o, a, k) < 0)) goto bad;
35125  return o;
35126  bad:
35127  Py_DECREF(o); o = 0;
35128  return NULL;
35129 }
35130 
35131 static void __pyx_tp_dealloc_array(PyObject *o) {
35132  struct __pyx_array_obj *p = (struct __pyx_array_obj *)o;
35133  #if CYTHON_USE_TP_FINALIZE
35134  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
35135  if (PyObject_CallFinalizerFromDealloc(o)) return;
35136  }
35137  #endif
35138  {
35139  PyObject *etype, *eval, *etb;
35140  PyErr_Fetch(&etype, &eval, &etb);
35141  ++Py_REFCNT(o);
35142  __pyx_array___dealloc__(o);
35143  --Py_REFCNT(o);
35144  PyErr_Restore(etype, eval, etb);
35145  }
35146  Py_CLEAR(p->mode);
35147  Py_CLEAR(p->_format);
35148  (*Py_TYPE(o)->tp_free)(o);
35149 }
35150 static PyObject *__pyx_sq_item_array(PyObject *o, Py_ssize_t i) {
35151  PyObject *r;
35152  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
35153  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
35154  Py_DECREF(x);
35155  return r;
35156 }
35157 
35158 static int __pyx_mp_ass_subscript_array(PyObject *o, PyObject *i, PyObject *v) {
35159  if (v) {
35160  return __pyx_array___setitem__(o, i, v);
35161  }
35162  else {
35163  PyErr_Format(PyExc_NotImplementedError,
35164  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
35165  return -1;
35166  }
35167 }
35168 
35169 static PyObject *__pyx_tp_getattro_array(PyObject *o, PyObject *n) {
35170  PyObject *v = __Pyx_PyObject_GenericGetAttr(o, n);
35171  if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
35172  PyErr_Clear();
35173  v = __pyx_array___getattr__(o, n);
35174  }
35175  return v;
35176 }
35177 
35178 static PyObject *__pyx_getprop___pyx_array_memview(PyObject *o, CYTHON_UNUSED void *x) {
35179  return __pyx_pw_15View_dot_MemoryView_5array_7memview_1__get__(o);
35180 }
35181 
35182 static PyMethodDef __pyx_methods_array[] = {
35183  {"__getattr__", (PyCFunction)__pyx_array___getattr__, METH_O|METH_COEXIST, 0},
35184  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_array_1__reduce_cython__, METH_NOARGS, 0},
35185  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_array_3__setstate_cython__, METH_O, 0},
35186  {0, 0, 0, 0}
35187 };
35188 
35189 static struct PyGetSetDef __pyx_getsets_array[] = {
35190  {(char *)"memview", __pyx_getprop___pyx_array_memview, 0, (char *)0, 0},
35191  {0, 0, 0, 0, 0}
35192 };
35193 
35194 static PySequenceMethods __pyx_tp_as_sequence_array = {
35195  __pyx_array___len__, /*sq_length*/
35196  0, /*sq_concat*/
35197  0, /*sq_repeat*/
35198  __pyx_sq_item_array, /*sq_item*/
35199  0, /*sq_slice*/
35200  0, /*sq_ass_item*/
35201  0, /*sq_ass_slice*/
35202  0, /*sq_contains*/
35203  0, /*sq_inplace_concat*/
35204  0, /*sq_inplace_repeat*/
35205 };
35206 
35207 static PyMappingMethods __pyx_tp_as_mapping_array = {
35208  __pyx_array___len__, /*mp_length*/
35209  __pyx_array___getitem__, /*mp_subscript*/
35210  __pyx_mp_ass_subscript_array, /*mp_ass_subscript*/
35211 };
35212 
35213 static PyBufferProcs __pyx_tp_as_buffer_array = {
35214  #if PY_MAJOR_VERSION < 3
35215  0, /*bf_getreadbuffer*/
35216  #endif
35217  #if PY_MAJOR_VERSION < 3
35218  0, /*bf_getwritebuffer*/
35219  #endif
35220  #if PY_MAJOR_VERSION < 3
35221  0, /*bf_getsegcount*/
35222  #endif
35223  #if PY_MAJOR_VERSION < 3
35224  0, /*bf_getcharbuffer*/
35225  #endif
35226  __pyx_array_getbuffer, /*bf_getbuffer*/
35227  0, /*bf_releasebuffer*/
35228 };
35229 
35230 static PyTypeObject __pyx_type___pyx_array = {
35231  PyVarObject_HEAD_INIT(0, 0)
35232  "cmeshTools.array", /*tp_name*/
35233  sizeof(struct __pyx_array_obj), /*tp_basicsize*/
35234  0, /*tp_itemsize*/
35235  __pyx_tp_dealloc_array, /*tp_dealloc*/
35236  0, /*tp_print*/
35237  0, /*tp_getattr*/
35238  0, /*tp_setattr*/
35239  #if PY_MAJOR_VERSION < 3
35240  0, /*tp_compare*/
35241  #endif
35242  #if PY_MAJOR_VERSION >= 3
35243  0, /*tp_as_async*/
35244  #endif
35245  0, /*tp_repr*/
35246  0, /*tp_as_number*/
35247  &__pyx_tp_as_sequence_array, /*tp_as_sequence*/
35248  &__pyx_tp_as_mapping_array, /*tp_as_mapping*/
35249  0, /*tp_hash*/
35250  0, /*tp_call*/
35251  0, /*tp_str*/
35252  __pyx_tp_getattro_array, /*tp_getattro*/
35253  0, /*tp_setattro*/
35254  &__pyx_tp_as_buffer_array, /*tp_as_buffer*/
35255  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
35256  0, /*tp_doc*/
35257  0, /*tp_traverse*/
35258  0, /*tp_clear*/
35259  0, /*tp_richcompare*/
35260  0, /*tp_weaklistoffset*/
35261  0, /*tp_iter*/
35262  0, /*tp_iternext*/
35263  __pyx_methods_array, /*tp_methods*/
35264  0, /*tp_members*/
35265  __pyx_getsets_array, /*tp_getset*/
35266  0, /*tp_base*/
35267  0, /*tp_dict*/
35268  0, /*tp_descr_get*/
35269  0, /*tp_descr_set*/
35270  0, /*tp_dictoffset*/
35271  0, /*tp_init*/
35272  0, /*tp_alloc*/
35273  __pyx_tp_new_array, /*tp_new*/
35274  0, /*tp_free*/
35275  0, /*tp_is_gc*/
35276  0, /*tp_bases*/
35277  0, /*tp_mro*/
35278  0, /*tp_cache*/
35279  0, /*tp_subclasses*/
35280  0, /*tp_weaklist*/
35281  0, /*tp_del*/
35282  0, /*tp_version_tag*/
35283  #if PY_VERSION_HEX >= 0x030400a1
35284  0, /*tp_finalize*/
35285  #endif
35286 };
35287 
35288 static PyObject *__pyx_tp_new_Enum(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
35289  struct __pyx_MemviewEnum_obj *p;
35290  PyObject *o;
35291  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
35292  o = (*t->tp_alloc)(t, 0);
35293  } else {
35294  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
35295  }
35296  if (unlikely(!o)) return 0;
35297  p = ((struct __pyx_MemviewEnum_obj *)o);
35298  p->name = Py_None; Py_INCREF(Py_None);
35299  return o;
35300 }
35301 
35302 static void __pyx_tp_dealloc_Enum(PyObject *o) {
35303  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
35304  #if CYTHON_USE_TP_FINALIZE
35305  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
35306  if (PyObject_CallFinalizerFromDealloc(o)) return;
35307  }
35308  #endif
35309  PyObject_GC_UnTrack(o);
35310  Py_CLEAR(p->name);
35311  (*Py_TYPE(o)->tp_free)(o);
35312 }
35313 
35314 static int __pyx_tp_traverse_Enum(PyObject *o, visitproc v, void *a) {
35315  int e;
35316  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
35317  if (p->name) {
35318  e = (*v)(p->name, a); if (e) return e;
35319  }
35320  return 0;
35321 }
35322 
35323 static int __pyx_tp_clear_Enum(PyObject *o) {
35324  PyObject* tmp;
35325  struct __pyx_MemviewEnum_obj *p = (struct __pyx_MemviewEnum_obj *)o;
35326  tmp = ((PyObject*)p->name);
35327  p->name = Py_None; Py_INCREF(Py_None);
35328  Py_XDECREF(tmp);
35329  return 0;
35330 }
35331 
35332 static PyMethodDef __pyx_methods_Enum[] = {
35333  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_1__reduce_cython__, METH_NOARGS, 0},
35334  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_MemviewEnum_3__setstate_cython__, METH_O, 0},
35335  {0, 0, 0, 0}
35336 };
35337 
35338 static PyTypeObject __pyx_type___pyx_MemviewEnum = {
35339  PyVarObject_HEAD_INIT(0, 0)
35340  "cmeshTools.Enum", /*tp_name*/
35341  sizeof(struct __pyx_MemviewEnum_obj), /*tp_basicsize*/
35342  0, /*tp_itemsize*/
35343  __pyx_tp_dealloc_Enum, /*tp_dealloc*/
35344  0, /*tp_print*/
35345  0, /*tp_getattr*/
35346  0, /*tp_setattr*/
35347  #if PY_MAJOR_VERSION < 3
35348  0, /*tp_compare*/
35349  #endif
35350  #if PY_MAJOR_VERSION >= 3
35351  0, /*tp_as_async*/
35352  #endif
35353  __pyx_MemviewEnum___repr__, /*tp_repr*/
35354  0, /*tp_as_number*/
35355  0, /*tp_as_sequence*/
35356  0, /*tp_as_mapping*/
35357  0, /*tp_hash*/
35358  0, /*tp_call*/
35359  0, /*tp_str*/
35360  0, /*tp_getattro*/
35361  0, /*tp_setattro*/
35362  0, /*tp_as_buffer*/
35363  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
35364  0, /*tp_doc*/
35365  __pyx_tp_traverse_Enum, /*tp_traverse*/
35366  __pyx_tp_clear_Enum, /*tp_clear*/
35367  0, /*tp_richcompare*/
35368  0, /*tp_weaklistoffset*/
35369  0, /*tp_iter*/
35370  0, /*tp_iternext*/
35371  __pyx_methods_Enum, /*tp_methods*/
35372  0, /*tp_members*/
35373  0, /*tp_getset*/
35374  0, /*tp_base*/
35375  0, /*tp_dict*/
35376  0, /*tp_descr_get*/
35377  0, /*tp_descr_set*/
35378  0, /*tp_dictoffset*/
35379  __pyx_MemviewEnum___init__, /*tp_init*/
35380  0, /*tp_alloc*/
35381  __pyx_tp_new_Enum, /*tp_new*/
35382  0, /*tp_free*/
35383  0, /*tp_is_gc*/
35384  0, /*tp_bases*/
35385  0, /*tp_mro*/
35386  0, /*tp_cache*/
35387  0, /*tp_subclasses*/
35388  0, /*tp_weaklist*/
35389  0, /*tp_del*/
35390  0, /*tp_version_tag*/
35391  #if PY_VERSION_HEX >= 0x030400a1
35392  0, /*tp_finalize*/
35393  #endif
35394 };
35395 static struct __pyx_vtabstruct_memoryview __pyx_vtable_memoryview;
35396 
35397 static PyObject *__pyx_tp_new_memoryview(PyTypeObject *t, PyObject *a, PyObject *k) {
35398  struct __pyx_memoryview_obj *p;
35399  PyObject *o;
35400  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
35401  o = (*t->tp_alloc)(t, 0);
35402  } else {
35403  o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
35404  }
35405  if (unlikely(!o)) return 0;
35406  p = ((struct __pyx_memoryview_obj *)o);
35407  p->__pyx_vtab = __pyx_vtabptr_memoryview;
35408  p->obj = Py_None; Py_INCREF(Py_None);
35409  p->_size = Py_None; Py_INCREF(Py_None);
35410  p->_array_interface = Py_None; Py_INCREF(Py_None);
35411  p->view.obj = NULL;
35412  if (unlikely(__pyx_memoryview___cinit__(o, a, k) < 0)) goto bad;
35413  return o;
35414  bad:
35415  Py_DECREF(o); o = 0;
35416  return NULL;
35417 }
35418 
35419 static void __pyx_tp_dealloc_memoryview(PyObject *o) {
35420  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
35421  #if CYTHON_USE_TP_FINALIZE
35422  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
35423  if (PyObject_CallFinalizerFromDealloc(o)) return;
35424  }
35425  #endif
35426  PyObject_GC_UnTrack(o);
35427  {
35428  PyObject *etype, *eval, *etb;
35429  PyErr_Fetch(&etype, &eval, &etb);
35430  ++Py_REFCNT(o);
35431  __pyx_memoryview___dealloc__(o);
35432  --Py_REFCNT(o);
35433  PyErr_Restore(etype, eval, etb);
35434  }
35435  Py_CLEAR(p->obj);
35436  Py_CLEAR(p->_size);
35437  Py_CLEAR(p->_array_interface);
35438  (*Py_TYPE(o)->tp_free)(o);
35439 }
35440 
35441 static int __pyx_tp_traverse_memoryview(PyObject *o, visitproc v, void *a) {
35442  int e;
35443  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
35444  if (p->obj) {
35445  e = (*v)(p->obj, a); if (e) return e;
35446  }
35447  if (p->_size) {
35448  e = (*v)(p->_size, a); if (e) return e;
35449  }
35450  if (p->_array_interface) {
35451  e = (*v)(p->_array_interface, a); if (e) return e;
35452  }
35453  if (p->view.obj) {
35454  e = (*v)(p->view.obj, a); if (e) return e;
35455  }
35456  return 0;
35457 }
35458 
35459 static int __pyx_tp_clear_memoryview(PyObject *o) {
35460  PyObject* tmp;
35461  struct __pyx_memoryview_obj *p = (struct __pyx_memoryview_obj *)o;
35462  tmp = ((PyObject*)p->obj);
35463  p->obj = Py_None; Py_INCREF(Py_None);
35464  Py_XDECREF(tmp);
35465  tmp = ((PyObject*)p->_size);
35466  p->_size = Py_None; Py_INCREF(Py_None);
35467  Py_XDECREF(tmp);
35468  tmp = ((PyObject*)p->_array_interface);
35469  p->_array_interface = Py_None; Py_INCREF(Py_None);
35470  Py_XDECREF(tmp);
35471  Py_CLEAR(p->view.obj);
35472  return 0;
35473 }
35474 static PyObject *__pyx_sq_item_memoryview(PyObject *o, Py_ssize_t i) {
35475  PyObject *r;
35476  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
35477  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
35478  Py_DECREF(x);
35479  return r;
35480 }
35481 
35482 static int __pyx_mp_ass_subscript_memoryview(PyObject *o, PyObject *i, PyObject *v) {
35483  if (v) {
35484  return __pyx_memoryview___setitem__(o, i, v);
35485  }
35486  else {
35487  PyErr_Format(PyExc_NotImplementedError,
35488  "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
35489  return -1;
35490  }
35491 }
35492 
35493 static PyObject *__pyx_getprop___pyx_memoryview_T(PyObject *o, CYTHON_UNUSED void *x) {
35494  return __pyx_pw_15View_dot_MemoryView_10memoryview_1T_1__get__(o);
35495 }
35496 
35497 static PyObject *__pyx_getprop___pyx_memoryview_base(PyObject *o, CYTHON_UNUSED void *x) {
35498  return __pyx_pw_15View_dot_MemoryView_10memoryview_4base_1__get__(o);
35499 }
35500 
35501 static PyObject *__pyx_getprop___pyx_memoryview_shape(PyObject *o, CYTHON_UNUSED void *x) {
35502  return __pyx_pw_15View_dot_MemoryView_10memoryview_5shape_1__get__(o);
35503 }
35504 
35505 static PyObject *__pyx_getprop___pyx_memoryview_strides(PyObject *o, CYTHON_UNUSED void *x) {
35506  return __pyx_pw_15View_dot_MemoryView_10memoryview_7strides_1__get__(o);
35507 }
35508 
35509 static PyObject *__pyx_getprop___pyx_memoryview_suboffsets(PyObject *o, CYTHON_UNUSED void *x) {
35510  return __pyx_pw_15View_dot_MemoryView_10memoryview_10suboffsets_1__get__(o);
35511 }
35512 
35513 static PyObject *__pyx_getprop___pyx_memoryview_ndim(PyObject *o, CYTHON_UNUSED void *x) {
35514  return __pyx_pw_15View_dot_MemoryView_10memoryview_4ndim_1__get__(o);
35515 }
35516 
35517 static PyObject *__pyx_getprop___pyx_memoryview_itemsize(PyObject *o, CYTHON_UNUSED void *x) {
35518  return __pyx_pw_15View_dot_MemoryView_10memoryview_8itemsize_1__get__(o);
35519 }
35520 
35521 static PyObject *__pyx_getprop___pyx_memoryview_nbytes(PyObject *o, CYTHON_UNUSED void *x) {
35522  return __pyx_pw_15View_dot_MemoryView_10memoryview_6nbytes_1__get__(o);
35523 }
35524 
35525 static PyObject *__pyx_getprop___pyx_memoryview_size(PyObject *o, CYTHON_UNUSED void *x) {
35526  return __pyx_pw_15View_dot_MemoryView_10memoryview_4size_1__get__(o);
35527 }
35528 
35529 static PyMethodDef __pyx_methods_memoryview[] = {
35530  {"is_c_contig", (PyCFunction)__pyx_memoryview_is_c_contig, METH_NOARGS, 0},
35531  {"is_f_contig", (PyCFunction)__pyx_memoryview_is_f_contig, METH_NOARGS, 0},
35532  {"copy", (PyCFunction)__pyx_memoryview_copy, METH_NOARGS, 0},
35533  {"copy_fortran", (PyCFunction)__pyx_memoryview_copy_fortran, METH_NOARGS, 0},
35534  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_1__reduce_cython__, METH_NOARGS, 0},
35535  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryview_3__setstate_cython__, METH_O, 0},
35536  {0, 0, 0, 0}
35537 };
35538 
35539 static struct PyGetSetDef __pyx_getsets_memoryview[] = {
35540  {(char *)"T", __pyx_getprop___pyx_memoryview_T, 0, (char *)0, 0},
35541  {(char *)"base", __pyx_getprop___pyx_memoryview_base, 0, (char *)0, 0},
35542  {(char *)"shape", __pyx_getprop___pyx_memoryview_shape, 0, (char *)0, 0},
35543  {(char *)"strides", __pyx_getprop___pyx_memoryview_strides, 0, (char *)0, 0},
35544  {(char *)"suboffsets", __pyx_getprop___pyx_memoryview_suboffsets, 0, (char *)0, 0},
35545  {(char *)"ndim", __pyx_getprop___pyx_memoryview_ndim, 0, (char *)0, 0},
35546  {(char *)"itemsize", __pyx_getprop___pyx_memoryview_itemsize, 0, (char *)0, 0},
35547  {(char *)"nbytes", __pyx_getprop___pyx_memoryview_nbytes, 0, (char *)0, 0},
35548  {(char *)"size", __pyx_getprop___pyx_memoryview_size, 0, (char *)0, 0},
35549  {0, 0, 0, 0, 0}
35550 };
35551 
35552 static PySequenceMethods __pyx_tp_as_sequence_memoryview = {
35553  __pyx_memoryview___len__, /*sq_length*/
35554  0, /*sq_concat*/
35555  0, /*sq_repeat*/
35556  __pyx_sq_item_memoryview, /*sq_item*/
35557  0, /*sq_slice*/
35558  0, /*sq_ass_item*/
35559  0, /*sq_ass_slice*/
35560  0, /*sq_contains*/
35561  0, /*sq_inplace_concat*/
35562  0, /*sq_inplace_repeat*/
35563 };
35564 
35565 static PyMappingMethods __pyx_tp_as_mapping_memoryview = {
35566  __pyx_memoryview___len__, /*mp_length*/
35567  __pyx_memoryview___getitem__, /*mp_subscript*/
35568  __pyx_mp_ass_subscript_memoryview, /*mp_ass_subscript*/
35569 };
35570 
35571 static PyBufferProcs __pyx_tp_as_buffer_memoryview = {
35572  #if PY_MAJOR_VERSION < 3
35573  0, /*bf_getreadbuffer*/
35574  #endif
35575  #if PY_MAJOR_VERSION < 3
35576  0, /*bf_getwritebuffer*/
35577  #endif
35578  #if PY_MAJOR_VERSION < 3
35579  0, /*bf_getsegcount*/
35580  #endif
35581  #if PY_MAJOR_VERSION < 3
35582  0, /*bf_getcharbuffer*/
35583  #endif
35584  __pyx_memoryview_getbuffer, /*bf_getbuffer*/
35585  0, /*bf_releasebuffer*/
35586 };
35587 
35588 static PyTypeObject __pyx_type___pyx_memoryview = {
35589  PyVarObject_HEAD_INIT(0, 0)
35590  "cmeshTools.memoryview", /*tp_name*/
35591  sizeof(struct __pyx_memoryview_obj), /*tp_basicsize*/
35592  0, /*tp_itemsize*/
35593  __pyx_tp_dealloc_memoryview, /*tp_dealloc*/
35594  0, /*tp_print*/
35595  0, /*tp_getattr*/
35596  0, /*tp_setattr*/
35597  #if PY_MAJOR_VERSION < 3
35598  0, /*tp_compare*/
35599  #endif
35600  #if PY_MAJOR_VERSION >= 3
35601  0, /*tp_as_async*/
35602  #endif
35603  __pyx_memoryview___repr__, /*tp_repr*/
35604  0, /*tp_as_number*/
35605  &__pyx_tp_as_sequence_memoryview, /*tp_as_sequence*/
35606  &__pyx_tp_as_mapping_memoryview, /*tp_as_mapping*/
35607  0, /*tp_hash*/
35608  0, /*tp_call*/
35609  __pyx_memoryview___str__, /*tp_str*/
35610  0, /*tp_getattro*/
35611  0, /*tp_setattro*/
35612  &__pyx_tp_as_buffer_memoryview, /*tp_as_buffer*/
35613  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
35614  0, /*tp_doc*/
35615  __pyx_tp_traverse_memoryview, /*tp_traverse*/
35616  __pyx_tp_clear_memoryview, /*tp_clear*/
35617  0, /*tp_richcompare*/
35618  0, /*tp_weaklistoffset*/
35619  0, /*tp_iter*/
35620  0, /*tp_iternext*/
35621  __pyx_methods_memoryview, /*tp_methods*/
35622  0, /*tp_members*/
35623  __pyx_getsets_memoryview, /*tp_getset*/
35624  0, /*tp_base*/
35625  0, /*tp_dict*/
35626  0, /*tp_descr_get*/
35627  0, /*tp_descr_set*/
35628  0, /*tp_dictoffset*/
35629  0, /*tp_init*/
35630  0, /*tp_alloc*/
35631  __pyx_tp_new_memoryview, /*tp_new*/
35632  0, /*tp_free*/
35633  0, /*tp_is_gc*/
35634  0, /*tp_bases*/
35635  0, /*tp_mro*/
35636  0, /*tp_cache*/
35637  0, /*tp_subclasses*/
35638  0, /*tp_weaklist*/
35639  0, /*tp_del*/
35640  0, /*tp_version_tag*/
35641  #if PY_VERSION_HEX >= 0x030400a1
35642  0, /*tp_finalize*/
35643  #endif
35644 };
35645 static struct __pyx_vtabstruct__memoryviewslice __pyx_vtable__memoryviewslice;
35646 
35647 static PyObject *__pyx_tp_new__memoryviewslice(PyTypeObject *t, PyObject *a, PyObject *k) {
35648  struct __pyx_memoryviewslice_obj *p;
35649  PyObject *o = __pyx_tp_new_memoryview(t, a, k);
35650  if (unlikely(!o)) return 0;
35651  p = ((struct __pyx_memoryviewslice_obj *)o);
35652  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_memoryview*)__pyx_vtabptr__memoryviewslice;
35653  p->from_object = Py_None; Py_INCREF(Py_None);
35654  p->from_slice.memview = NULL;
35655  return o;
35656 }
35657 
35658 static void __pyx_tp_dealloc__memoryviewslice(PyObject *o) {
35659  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
35660  #if CYTHON_USE_TP_FINALIZE
35661  if (unlikely(PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE) && Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
35662  if (PyObject_CallFinalizerFromDealloc(o)) return;
35663  }
35664  #endif
35665  PyObject_GC_UnTrack(o);
35666  {
35667  PyObject *etype, *eval, *etb;
35668  PyErr_Fetch(&etype, &eval, &etb);
35669  ++Py_REFCNT(o);
35670  __pyx_memoryviewslice___dealloc__(o);
35671  --Py_REFCNT(o);
35672  PyErr_Restore(etype, eval, etb);
35673  }
35674  Py_CLEAR(p->from_object);
35675  PyObject_GC_Track(o);
35676  __pyx_tp_dealloc_memoryview(o);
35677 }
35678 
35679 static int __pyx_tp_traverse__memoryviewslice(PyObject *o, visitproc v, void *a) {
35680  int e;
35681  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
35682  e = __pyx_tp_traverse_memoryview(o, v, a); if (e) return e;
35683  if (p->from_object) {
35684  e = (*v)(p->from_object, a); if (e) return e;
35685  }
35686  return 0;
35687 }
35688 
35689 static int __pyx_tp_clear__memoryviewslice(PyObject *o) {
35690  PyObject* tmp;
35691  struct __pyx_memoryviewslice_obj *p = (struct __pyx_memoryviewslice_obj *)o;
35692  __pyx_tp_clear_memoryview(o);
35693  tmp = ((PyObject*)p->from_object);
35694  p->from_object = Py_None; Py_INCREF(Py_None);
35695  Py_XDECREF(tmp);
35696  __PYX_XDEC_MEMVIEW(&p->from_slice, 1);
35697  return 0;
35698 }
35699 
35700 static PyObject *__pyx_getprop___pyx_memoryviewslice_base(PyObject *o, CYTHON_UNUSED void *x) {
35701  return __pyx_pw_15View_dot_MemoryView_16_memoryviewslice_4base_1__get__(o);
35702 }
35703 
35704 static PyMethodDef __pyx_methods__memoryviewslice[] = {
35705  {"__reduce_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_1__reduce_cython__, METH_NOARGS, 0},
35706  {"__setstate_cython__", (PyCFunction)__pyx_pw___pyx_memoryviewslice_3__setstate_cython__, METH_O, 0},
35707  {0, 0, 0, 0}
35708 };
35709 
35710 static struct PyGetSetDef __pyx_getsets__memoryviewslice[] = {
35711  {(char *)"base", __pyx_getprop___pyx_memoryviewslice_base, 0, (char *)0, 0},
35712  {0, 0, 0, 0, 0}
35713 };
35714 
35715 static PyTypeObject __pyx_type___pyx_memoryviewslice = {
35716  PyVarObject_HEAD_INIT(0, 0)
35717  "cmeshTools._memoryviewslice", /*tp_name*/
35718  sizeof(struct __pyx_memoryviewslice_obj), /*tp_basicsize*/
35719  0, /*tp_itemsize*/
35720  __pyx_tp_dealloc__memoryviewslice, /*tp_dealloc*/
35721  0, /*tp_print*/
35722  0, /*tp_getattr*/
35723  0, /*tp_setattr*/
35724  #if PY_MAJOR_VERSION < 3
35725  0, /*tp_compare*/
35726  #endif
35727  #if PY_MAJOR_VERSION >= 3
35728  0, /*tp_as_async*/
35729  #endif
35730  #if CYTHON_COMPILING_IN_PYPY
35731  __pyx_memoryview___repr__, /*tp_repr*/
35732  #else
35733  0, /*tp_repr*/
35734  #endif
35735  0, /*tp_as_number*/
35736  0, /*tp_as_sequence*/
35737  0, /*tp_as_mapping*/
35738  0, /*tp_hash*/
35739  0, /*tp_call*/
35740  #if CYTHON_COMPILING_IN_PYPY
35741  __pyx_memoryview___str__, /*tp_str*/
35742  #else
35743  0, /*tp_str*/
35744  #endif
35745  0, /*tp_getattro*/
35746  0, /*tp_setattro*/
35747  0, /*tp_as_buffer*/
35748  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
35749  "Internal class for passing memoryview slices to Python", /*tp_doc*/
35750  __pyx_tp_traverse__memoryviewslice, /*tp_traverse*/
35751  __pyx_tp_clear__memoryviewslice, /*tp_clear*/
35752  0, /*tp_richcompare*/
35753  0, /*tp_weaklistoffset*/
35754  0, /*tp_iter*/
35755  0, /*tp_iternext*/
35756  __pyx_methods__memoryviewslice, /*tp_methods*/
35757  0, /*tp_members*/
35758  __pyx_getsets__memoryviewslice, /*tp_getset*/
35759  0, /*tp_base*/
35760  0, /*tp_dict*/
35761  0, /*tp_descr_get*/
35762  0, /*tp_descr_set*/
35763  0, /*tp_dictoffset*/
35764  0, /*tp_init*/
35765  0, /*tp_alloc*/
35766  __pyx_tp_new__memoryviewslice, /*tp_new*/
35767  0, /*tp_free*/
35768  0, /*tp_is_gc*/
35769  0, /*tp_bases*/
35770  0, /*tp_mro*/
35771  0, /*tp_cache*/
35772  0, /*tp_subclasses*/
35773  0, /*tp_weaklist*/
35774  0, /*tp_del*/
35775  0, /*tp_version_tag*/
35776  #if PY_VERSION_HEX >= 0x030400a1
35777  0, /*tp_finalize*/
35778  #endif
35779 };
35780 
35781 static PyMethodDef __pyx_methods[] = {
35782  {"generateTetrahedralMeshFromRectangularGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_7generateTetrahedralMeshFromRectangularGrid, METH_VARARGS|METH_KEYWORDS, 0},
35783  {"cmeshToolsComputeGeometricInfo_tetrahedron", (PyCFunction)__pyx_pw_10cmeshTools_9cmeshToolsComputeGeometricInfo_tetrahedron, METH_O, 0},
35784  {"generateFromTriangleFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_11generateFromTriangleFiles, METH_VARARGS|METH_KEYWORDS, 0},
35785  {"writeTriangleFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_13writeTriangleFiles, METH_VARARGS|METH_KEYWORDS, 0},
35786  {"generateFromTetgenFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_15generateFromTetgenFiles, METH_VARARGS|METH_KEYWORDS, 0},
35787  {"generateFromTetgenFilesParallel", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_17generateFromTetgenFilesParallel, METH_VARARGS|METH_KEYWORDS, 0},
35788  {"writeTetgenFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_19writeTetgenFiles, METH_VARARGS|METH_KEYWORDS, 0},
35789  {"write3dmFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_21write3dmFiles, METH_VARARGS|METH_KEYWORDS, 0},
35790  {"write2dmFiles", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_23write2dmFiles, METH_VARARGS|METH_KEYWORDS, 0},
35791  {"generateFromHexFile", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_25generateFromHexFile, METH_VARARGS|METH_KEYWORDS, 0},
35792  {"generateFrom3DMFile", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_27generateFrom3DMFile, METH_VARARGS|METH_KEYWORDS, 0},
35793  {"generateFrom2DMFile", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_29generateFrom2DMFile, METH_VARARGS|METH_KEYWORDS, 0},
35794  {"computeGeometricInfo_tetrahedron", (PyCFunction)__pyx_pw_10cmeshTools_31computeGeometricInfo_tetrahedron, METH_O, 0},
35795  {"allocateGeometricInfo_tetrahedron", (PyCFunction)__pyx_pw_10cmeshTools_33allocateGeometricInfo_tetrahedron, METH_O, 0},
35796  {"allocateNodeAndElementNodeDataStructures", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_35allocateNodeAndElementNodeDataStructures, METH_VARARGS|METH_KEYWORDS, 0},
35797  {"constructElementBoundaryElementsArray", (PyCFunction)__pyx_pw_10cmeshTools_37constructElementBoundaryElementsArray, METH_O, 0},
35798  {"generateTriangularMeshFromRectangularGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_39generateTriangularMeshFromRectangularGrid, METH_VARARGS|METH_KEYWORDS, 0},
35799  {"generateHexahedralMeshFromRectangularGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_41generateHexahedralMeshFromRectangularGrid, METH_VARARGS|METH_KEYWORDS, 0},
35800  {"generateQuadrilateralMeshFromRectangularGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_43generateQuadrilateralMeshFromRectangularGrid, METH_VARARGS|METH_KEYWORDS, 0},
35801  {"computeGeometricInfo_triangle", (PyCFunction)__pyx_pw_10cmeshTools_45computeGeometricInfo_triangle, METH_O, 0},
35802  {"allocateGeometricInfo_triangle", (PyCFunction)__pyx_pw_10cmeshTools_47allocateGeometricInfo_triangle, METH_O, 0},
35803  {"generateEdgeMeshFromRectangularGrid", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_10cmeshTools_49generateEdgeMeshFromRectangularGrid, METH_VARARGS|METH_KEYWORDS, 0},
35804  {"computeGeometricInfo_edge", (PyCFunction)__pyx_pw_10cmeshTools_51computeGeometricInfo_edge, METH_O, 0},
35805  {"allocateGeometricInfo_edge", (PyCFunction)__pyx_pw_10cmeshTools_53allocateGeometricInfo_edge, METH_O, 0},
35806  {"computeGeometricInfo_hexahedron", (PyCFunction)__pyx_pw_10cmeshTools_55computeGeometricInfo_hexahedron, METH_O, 0},
35807  {"computeGeometricInfo_quadrilateral", (PyCFunction)__pyx_pw_10cmeshTools_57computeGeometricInfo_quadrilateral, METH_O, 0},
35808  {"allocateGeometricInfo_hexahedron", (PyCFunction)__pyx_pw_10cmeshTools_59allocateGeometricInfo_hexahedron, METH_O, 0},
35809  {"allocateGeometricInfo_quadrilateral", (PyCFunction)__pyx_pw_10cmeshTools_61allocateGeometricInfo_quadrilateral, METH_O, 0},
35810  {"computeGeometricInfo_NURBS", (PyCFunction)__pyx_pw_10cmeshTools_63computeGeometricInfo_NURBS, METH_O, 0},
35811  {"allocateGeometricInfo_NURBS", (PyCFunction)__pyx_pw_10cmeshTools_65allocateGeometricInfo_NURBS, METH_O, 0},
35812  {0, 0, 0, 0}
35813 };
35814 
35815 #if PY_MAJOR_VERSION >= 3
35816 #if CYTHON_PEP489_MULTI_PHASE_INIT
35817 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
35818 static int __pyx_pymod_exec_cmeshTools(PyObject* module); /*proto*/
35819 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
35820  {Py_mod_create, (void*)__pyx_pymod_create},
35821  {Py_mod_exec, (void*)__pyx_pymod_exec_cmeshTools},
35822  {0, NULL}
35823 };
35824 #endif
35825 
35826 static struct PyModuleDef __pyx_moduledef = {
35827  PyModuleDef_HEAD_INIT,
35828  "cmeshTools",
35829  0, /* m_doc */
35830  #if CYTHON_PEP489_MULTI_PHASE_INIT
35831  0, /* m_size */
35832  #else
35833  -1, /* m_size */
35834  #endif
35835  __pyx_methods /* m_methods */,
35836  #if CYTHON_PEP489_MULTI_PHASE_INIT
35837  __pyx_moduledef_slots, /* m_slots */
35838  #else
35839  NULL, /* m_reload */
35840  #endif
35841  NULL, /* m_traverse */
35842  NULL, /* m_clear */
35843  NULL /* m_free */
35844 };
35845 #endif
35846 #ifndef CYTHON_SMALL_CODE
35847 #if defined(__clang__)
35848  #define CYTHON_SMALL_CODE
35849 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
35850  #define CYTHON_SMALL_CODE __attribute__((cold))
35851 #else
35852  #define CYTHON_SMALL_CODE
35853 #endif
35854 #endif
35855 
35856 static __Pyx_StringTabEntry __pyx_string_tab[] = {
35857  {&__pyx_n_s_ASCII, __pyx_k_ASCII, sizeof(__pyx_k_ASCII), 0, 0, 1, 1},
35858  {&__pyx_kp_s_Buffer_view_does_not_expose_stri, __pyx_k_Buffer_view_does_not_expose_stri, sizeof(__pyx_k_Buffer_view_does_not_expose_stri), 0, 0, 1, 0},
35859  {&__pyx_n_s_CMesh, __pyx_k_CMesh, sizeof(__pyx_k_CMesh), 0, 0, 1, 1},
35860  {&__pyx_n_s_CMultilevelMesh, __pyx_k_CMultilevelMesh, sizeof(__pyx_k_CMultilevelMesh), 0, 0, 1, 1},
35861  {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0},
35862  {&__pyx_kp_s_Cannot_assign_to_read_only_memor, __pyx_k_Cannot_assign_to_read_only_memor, sizeof(__pyx_k_Cannot_assign_to_read_only_memor), 0, 0, 1, 0},
35863  {&__pyx_kp_s_Cannot_create_writable_memory_vi, __pyx_k_Cannot_create_writable_memory_vi, sizeof(__pyx_k_Cannot_create_writable_memory_vi), 0, 0, 1, 0},
35864  {&__pyx_kp_s_Cannot_index_with_type_s, __pyx_k_Cannot_index_with_type_s, sizeof(__pyx_k_Cannot_index_with_type_s), 0, 0, 1, 0},
35865  {&__pyx_n_s_Comm, __pyx_k_Comm, sizeof(__pyx_k_Comm), 0, 0, 1, 1},
35866  {&__pyx_n_s_Ellipsis, __pyx_k_Ellipsis, sizeof(__pyx_k_Ellipsis), 0, 0, 1, 1},
35867  {&__pyx_kp_s_Empty_shape_tuple_for_cython_arr, __pyx_k_Empty_shape_tuple_for_cython_arr, sizeof(__pyx_k_Empty_shape_tuple_for_cython_arr), 0, 0, 1, 0},
35868  {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0},
35869  {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0},
35870  {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1},
35871  {&__pyx_kp_s_Incompatible_checksums_s_vs_0xb0, __pyx_k_Incompatible_checksums_s_vs_0xb0, sizeof(__pyx_k_Incompatible_checksums_s_vs_0xb0), 0, 0, 1, 0},
35872  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
35873  {&__pyx_kp_s_Indirect_dimensions_not_supporte, __pyx_k_Indirect_dimensions_not_supporte, sizeof(__pyx_k_Indirect_dimensions_not_supporte), 0, 0, 1, 0},
35874  {&__pyx_kp_s_Invalid_mode_expected_c_or_fortr, __pyx_k_Invalid_mode_expected_c_or_fortr, sizeof(__pyx_k_Invalid_mode_expected_c_or_fortr), 0, 0, 1, 0},
35875  {&__pyx_kp_s_Invalid_shape_in_axis_d_d, __pyx_k_Invalid_shape_in_axis_d_d, sizeof(__pyx_k_Invalid_shape_in_axis_d_d), 0, 0, 1, 0},
35876  {&__pyx_n_s_Lx, __pyx_k_Lx, sizeof(__pyx_k_Lx), 0, 0, 1, 1},
35877  {&__pyx_n_s_Ly, __pyx_k_Ly, sizeof(__pyx_k_Ly), 0, 0, 1, 1},
35878  {&__pyx_n_s_Lz, __pyx_k_Lz, sizeof(__pyx_k_Lz), 0, 0, 1, 1},
35879  {&__pyx_n_s_MPI, __pyx_k_MPI, sizeof(__pyx_k_MPI), 0, 0, 1, 1},
35880  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
35881  {&__pyx_kp_s_MemoryView_of_r_at_0x_x, __pyx_k_MemoryView_of_r_at_0x_x, sizeof(__pyx_k_MemoryView_of_r_at_0x_x), 0, 0, 1, 0},
35882  {&__pyx_kp_s_MemoryView_of_r_object, __pyx_k_MemoryView_of_r_object, sizeof(__pyx_k_MemoryView_of_r_object), 0, 0, 1, 0},
35883  {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0},
35884  {&__pyx_n_b_O, __pyx_k_O, sizeof(__pyx_k_O), 0, 0, 0, 1},
35885  {&__pyx_kp_s_Out_of_bounds_on_buffer_access_a, __pyx_k_Out_of_bounds_on_buffer_access_a, sizeof(__pyx_k_Out_of_bounds_on_buffer_access_a), 0, 0, 1, 0},
35886  {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
35887  {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
35888  {&__pyx_kp_b_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 0, 0},
35889  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
35890  {&__pyx_n_s_U_KNOT, __pyx_k_U_KNOT, sizeof(__pyx_k_U_KNOT), 0, 0, 1, 1},
35891  {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0},
35892  {&__pyx_n_s_V_KNOT, __pyx_k_V_KNOT, sizeof(__pyx_k_V_KNOT), 0, 0, 1, 1},
35893  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
35894  {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1},
35895  {&__pyx_n_s_W_KNOT, __pyx_k_W_KNOT, sizeof(__pyx_k_W_KNOT), 0, 0, 1, 1},
35896  {&__pyx_kp_b__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 0, 0, 0},
35897  {&__pyx_kp_b__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 0, 0, 0},
35898  {&__pyx_kp_b__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 0, 0, 0},
35899  {&__pyx_kp_b__34, __pyx_k__34, sizeof(__pyx_k__34), 0, 0, 0, 0},
35900  {&__pyx_kp_u__35, __pyx_k__35, sizeof(__pyx_k__35), 0, 1, 0, 0},
35901  {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1},
35902  {&__pyx_n_s_asarray, __pyx_k_asarray, sizeof(__pyx_k_asarray), 0, 0, 1, 1},
35903  {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
35904  {&__pyx_n_s_buildPythonMeshInterface, __pyx_k_buildPythonMeshInterface, sizeof(__pyx_k_buildPythonMeshInterface), 0, 0, 1, 1},
35905  {&__pyx_n_s_buildPythonMeshInterfaceNoArrays, __pyx_k_buildPythonMeshInterfaceNoArrays, sizeof(__pyx_k_buildPythonMeshInterfaceNoArrays), 0, 0, 1, 1},
35906  {&__pyx_n_s_buildPythonMultilevelMeshInterfa, __pyx_k_buildPythonMultilevelMeshInterfa, sizeof(__pyx_k_buildPythonMultilevelMeshInterfa), 0, 0, 1, 1},
35907  {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
35908  {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1},
35909  {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
35910  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
35911  {&__pyx_n_s_cmesh, __pyx_k_cmesh, sizeof(__pyx_k_cmesh), 0, 0, 1, 1},
35912  {&__pyx_n_s_cmeshList, __pyx_k_cmeshList, sizeof(__pyx_k_cmeshList), 0, 0, 1, 1},
35913  {&__pyx_n_s_cmeshTools, __pyx_k_cmeshTools, sizeof(__pyx_k_cmeshTools), 0, 0, 1, 1},
35914  {&__pyx_n_s_cmultilevelMesh, __pyx_k_cmultilevelMesh, sizeof(__pyx_k_cmultilevelMesh), 0, 0, 1, 1},
35915  {&__pyx_kp_s_contiguous_and_direct, __pyx_k_contiguous_and_direct, sizeof(__pyx_k_contiguous_and_direct), 0, 0, 1, 0},
35916  {&__pyx_kp_s_contiguous_and_indirect, __pyx_k_contiguous_and_indirect, sizeof(__pyx_k_contiguous_and_indirect), 0, 0, 1, 0},
35917  {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
35918  {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
35919  {&__pyx_n_s_dtype_is_object, __pyx_k_dtype_is_object, sizeof(__pyx_k_dtype_is_object), 0, 0, 1, 1},
35920  {&__pyx_n_s_edgeNodesArray, __pyx_k_edgeNodesArray, sizeof(__pyx_k_edgeNodesArray), 0, 0, 1, 1},
35921  {&__pyx_n_s_elementBarycentersArray, __pyx_k_elementBarycentersArray, sizeof(__pyx_k_elementBarycentersArray), 0, 0, 1, 1},
35922  {&__pyx_n_s_elementBoundariesArray, __pyx_k_elementBoundariesArray, sizeof(__pyx_k_elementBoundariesArray), 0, 0, 1, 1},
35923  {&__pyx_n_s_elementBoundaryBarycentersArray, __pyx_k_elementBoundaryBarycentersArray, sizeof(__pyx_k_elementBoundaryBarycentersArray), 0, 0, 1, 1},
35924  {&__pyx_n_s_elementBoundaryDiametersArray, __pyx_k_elementBoundaryDiametersArray, sizeof(__pyx_k_elementBoundaryDiametersArray), 0, 0, 1, 1},
35925  {&__pyx_n_s_elementBoundaryElementsArray, __pyx_k_elementBoundaryElementsArray, sizeof(__pyx_k_elementBoundaryElementsArray), 0, 0, 1, 1},
35926  {&__pyx_n_s_elementBoundaryLocalElementBound, __pyx_k_elementBoundaryLocalElementBound, sizeof(__pyx_k_elementBoundaryLocalElementBound), 0, 0, 1, 1},
35927  {&__pyx_n_s_elementBoundaryMaterialTypes, __pyx_k_elementBoundaryMaterialTypes, sizeof(__pyx_k_elementBoundaryMaterialTypes), 0, 0, 1, 1},
35928  {&__pyx_n_s_elementBoundaryNodesArray, __pyx_k_elementBoundaryNodesArray, sizeof(__pyx_k_elementBoundaryNodesArray), 0, 0, 1, 1},
35929  {&__pyx_n_s_elementChildrenArrayList, __pyx_k_elementChildrenArrayList, sizeof(__pyx_k_elementChildrenArrayList), 0, 0, 1, 1},
35930  {&__pyx_n_s_elementChildrenOffsetsList, __pyx_k_elementChildrenOffsetsList, sizeof(__pyx_k_elementChildrenOffsetsList), 0, 0, 1, 1},
35931  {&__pyx_n_s_elementDiametersArray, __pyx_k_elementDiametersArray, sizeof(__pyx_k_elementDiametersArray), 0, 0, 1, 1},
35932  {&__pyx_n_s_elementIJK, __pyx_k_elementIJK, sizeof(__pyx_k_elementIJK), 0, 0, 1, 1},
35933  {&__pyx_n_s_elementInnerDiametersArray, __pyx_k_elementInnerDiametersArray, sizeof(__pyx_k_elementInnerDiametersArray), 0, 0, 1, 1},
35934  {&__pyx_n_s_elementMaterialTypes, __pyx_k_elementMaterialTypes, sizeof(__pyx_k_elementMaterialTypes), 0, 0, 1, 1},
35935  {&__pyx_n_s_elementNeighborsArray, __pyx_k_elementNeighborsArray, sizeof(__pyx_k_elementNeighborsArray), 0, 0, 1, 1},
35936  {&__pyx_n_s_elementNodesArray, __pyx_k_elementNodesArray, sizeof(__pyx_k_elementNodesArray), 0, 0, 1, 1},
35937  {&__pyx_n_s_elementParentsArrayList, __pyx_k_elementParentsArrayList, sizeof(__pyx_k_elementParentsArrayList), 0, 0, 1, 1},
35938  {&__pyx_n_s_elementTagArray, __pyx_k_elementTagArray, sizeof(__pyx_k_elementTagArray), 0, 0, 1, 1},
35939  {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
35940  {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1},
35941  {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
35942  {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
35943  {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
35944  {&__pyx_n_s_exteriorElementBoundariesArray, __pyx_k_exteriorElementBoundariesArray, sizeof(__pyx_k_exteriorElementBoundariesArray), 0, 0, 1, 1},
35945  {&__pyx_n_s_failed, __pyx_k_failed, sizeof(__pyx_k_failed), 0, 0, 1, 1},
35946  {&__pyx_n_s_file, __pyx_k_file, sizeof(__pyx_k_file), 0, 0, 1, 1},
35947  {&__pyx_n_s_filebase, __pyx_k_filebase, sizeof(__pyx_k_filebase), 0, 0, 1, 1},
35948  {&__pyx_n_s_finestLevel, __pyx_k_finestLevel, sizeof(__pyx_k_finestLevel), 0, 0, 1, 1},
35949  {&__pyx_n_s_flags, __pyx_k_flags, sizeof(__pyx_k_flags), 0, 0, 1, 1},
35950  {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
35951  {&__pyx_n_s_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 0, 1, 1},
35952  {&__pyx_n_u_fortran, __pyx_k_fortran, sizeof(__pyx_k_fortran), 0, 1, 0, 1},
35953  {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
35954  {&__pyx_kp_s_got_differing_extents_in_dimensi, __pyx_k_got_differing_extents_in_dimensi, sizeof(__pyx_k_got_differing_extents_in_dimensi), 0, 0, 1, 0},
35955  {&__pyx_n_s_h, __pyx_k_h, sizeof(__pyx_k_h), 0, 0, 1, 1},
35956  {&__pyx_n_s_hMin, __pyx_k_hMin, sizeof(__pyx_k_hMin), 0, 0, 1, 1},
35957  {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
35958  {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
35959  {&__pyx_n_s_int32, __pyx_k_int32, sizeof(__pyx_k_int32), 0, 0, 1, 1},
35960  {&__pyx_n_s_interiorElementBoundariesArray, __pyx_k_interiorElementBoundariesArray, sizeof(__pyx_k_interiorElementBoundariesArray), 0, 0, 1, 1},
35961  {&__pyx_n_s_itemsize, __pyx_k_itemsize, sizeof(__pyx_k_itemsize), 0, 0, 1, 1},
35962  {&__pyx_kp_s_itemsize_0_for_cython_array, __pyx_k_itemsize_0_for_cython_array, sizeof(__pyx_k_itemsize_0_for_cython_array), 0, 0, 1, 0},
35963  {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
35964  {&__pyx_n_s_locallyRefineMultilevelMesh, __pyx_k_locallyRefineMultilevelMesh, sizeof(__pyx_k_locallyRefineMultilevelMesh), 0, 0, 1, 1},
35965  {&__pyx_kp_s_locallyRefine_nSpace_0_d_not_imp, __pyx_k_locallyRefine_nSpace_0_d_not_imp, sizeof(__pyx_k_locallyRefine_nSpace_0_d_not_imp), 0, 0, 1, 0},
35966  {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
35967  {&__pyx_n_s_max_nElements_node, __pyx_k_max_nElements_node, sizeof(__pyx_k_max_nElements_node), 0, 0, 1, 1},
35968  {&__pyx_n_s_max_nNodeNeighbors_node, __pyx_k_max_nNodeNeighbors_node, sizeof(__pyx_k_max_nNodeNeighbors_node), 0, 0, 1, 1},
35969  {&__pyx_n_s_memview, __pyx_k_memview, sizeof(__pyx_k_memview), 0, 0, 1, 1},
35970  {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
35971  {&__pyx_n_s_mpi4py, __pyx_k_mpi4py, sizeof(__pyx_k_mpi4py), 0, 0, 1, 1},
35972  {&__pyx_n_s_nEdges_global, __pyx_k_nEdges_global, sizeof(__pyx_k_nEdges_global), 0, 0, 1, 1},
35973  {&__pyx_n_s_nElementBoundaries_element, __pyx_k_nElementBoundaries_element, sizeof(__pyx_k_nElementBoundaries_element), 0, 0, 1, 1},
35974  {&__pyx_n_s_nElementBoundaries_global, __pyx_k_nElementBoundaries_global, sizeof(__pyx_k_nElementBoundaries_global), 0, 0, 1, 1},
35975  {&__pyx_n_s_nElements_global, __pyx_k_nElements_global, sizeof(__pyx_k_nElements_global), 0, 0, 1, 1},
35976  {&__pyx_n_s_nExteriorElementBoundaries_globa, __pyx_k_nExteriorElementBoundaries_globa, sizeof(__pyx_k_nExteriorElementBoundaries_globa), 0, 0, 1, 1},
35977  {&__pyx_n_s_nInteriorElementBoundaries_globa, __pyx_k_nInteriorElementBoundaries_globa, sizeof(__pyx_k_nInteriorElementBoundaries_globa), 0, 0, 1, 1},
35978  {&__pyx_n_s_nLevels, __pyx_k_nLevels, sizeof(__pyx_k_nLevels), 0, 0, 1, 1},
35979  {&__pyx_n_s_nNodes_element, __pyx_k_nNodes_element, sizeof(__pyx_k_nNodes_element), 0, 0, 1, 1},
35980  {&__pyx_n_s_nNodes_elementBoundary, __pyx_k_nNodes_elementBoundary, sizeof(__pyx_k_nNodes_elementBoundary), 0, 0, 1, 1},
35981  {&__pyx_n_s_nNodes_global, __pyx_k_nNodes_global, sizeof(__pyx_k_nNodes_global), 0, 0, 1, 1},
35982  {&__pyx_n_s_nSpace, __pyx_k_nSpace, sizeof(__pyx_k_nSpace), 0, 0, 1, 1},
35983  {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
35984  {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
35985  {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0},
35986  {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0},
35987  {&__pyx_n_s_ndim, __pyx_k_ndim, sizeof(__pyx_k_ndim), 0, 0, 1, 1},
35988  {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
35989  {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
35990  {&__pyx_n_s_nodeArray, __pyx_k_nodeArray, sizeof(__pyx_k_nodeArray), 0, 0, 1, 1},
35991  {&__pyx_n_s_nodeDiametersArray, __pyx_k_nodeDiametersArray, sizeof(__pyx_k_nodeDiametersArray), 0, 0, 1, 1},
35992  {&__pyx_n_s_nodeElementOffsets, __pyx_k_nodeElementOffsets, sizeof(__pyx_k_nodeElementOffsets), 0, 0, 1, 1},
35993  {&__pyx_n_s_nodeElementsArray, __pyx_k_nodeElementsArray, sizeof(__pyx_k_nodeElementsArray), 0, 0, 1, 1},
35994  {&__pyx_n_s_nodeMaterialTypes, __pyx_k_nodeMaterialTypes, sizeof(__pyx_k_nodeMaterialTypes), 0, 0, 1, 1},
35995  {&__pyx_n_s_nodeStarArray, __pyx_k_nodeStarArray, sizeof(__pyx_k_nodeStarArray), 0, 0, 1, 1},
35996  {&__pyx_n_s_nodeStarOffsets, __pyx_k_nodeStarOffsets, sizeof(__pyx_k_nodeStarOffsets), 0, 0, 1, 1},
35997  {&__pyx_n_s_nodeSupportArray, __pyx_k_nodeSupportArray, sizeof(__pyx_k_nodeSupportArray), 0, 0, 1, 1},
35998  {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
35999  {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
36000  {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0},
36001  {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0},
36002  {&__pyx_n_s_nx, __pyx_k_nx, sizeof(__pyx_k_nx), 0, 0, 1, 1},
36003  {&__pyx_n_s_ny, __pyx_k_ny, sizeof(__pyx_k_ny), 0, 0, 1, 1},
36004  {&__pyx_n_s_nz, __pyx_k_nz, sizeof(__pyx_k_nz), 0, 0, 1, 1},
36005  {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
36006  {&__pyx_n_s_pack, __pyx_k_pack, sizeof(__pyx_k_pack), 0, 0, 1, 1},
36007  {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
36008  {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
36009  {&__pyx_n_s_proteus, __pyx_k_proteus, sizeof(__pyx_k_proteus), 0, 0, 1, 1},
36010  {&__pyx_kp_s_proteus_cmeshTools_pyx, __pyx_k_proteus_cmeshTools_pyx, sizeof(__pyx_k_proteus_cmeshTools_pyx), 0, 0, 1, 0},
36011  {&__pyx_n_s_px, __pyx_k_px, sizeof(__pyx_k_px), 0, 0, 1, 1},
36012  {&__pyx_n_s_py, __pyx_k_py, sizeof(__pyx_k_py), 0, 0, 1, 1},
36013  {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
36014  {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
36015  {&__pyx_n_s_pyx_getbuffer, __pyx_k_pyx_getbuffer, sizeof(__pyx_k_pyx_getbuffer), 0, 0, 1, 1},
36016  {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
36017  {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
36018  {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
36019  {&__pyx_n_s_pyx_unpickle_Enum, __pyx_k_pyx_unpickle_Enum, sizeof(__pyx_k_pyx_unpickle_Enum), 0, 0, 1, 1},
36020  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
36021  {&__pyx_n_s_pz, __pyx_k_pz, sizeof(__pyx_k_pz), 0, 0, 1, 1},
36022  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
36023  {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
36024  {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
36025  {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
36026  {&__pyx_n_s_refineTypeFlag, __pyx_k_refineTypeFlag, sizeof(__pyx_k_refineTypeFlag), 0, 0, 1, 1},
36027  {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
36028  {&__pyx_kp_s_self_mesh_cannot_be_converted_to, __pyx_k_self_mesh_cannot_be_converted_to, sizeof(__pyx_k_self_mesh_cannot_be_converted_to), 0, 0, 1, 0},
36029  {&__pyx_kp_s_self_multilevelMesh_cannot_be_co, __pyx_k_self_multilevelMesh_cannot_be_co, sizeof(__pyx_k_self_multilevelMesh_cannot_be_co), 0, 0, 1, 0},
36030  {&__pyx_n_s_setNewestNodeBases, __pyx_k_setNewestNodeBases, sizeof(__pyx_k_setNewestNodeBases), 0, 0, 1, 1},
36031  {&__pyx_kp_s_setNewestNodeBases_0_d_not_imple, __pyx_k_setNewestNodeBases_0_d_not_imple, sizeof(__pyx_k_setNewestNodeBases_0_d_not_imple), 0, 0, 1, 0},
36032  {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
36033  {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
36034  {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
36035  {&__pyx_n_s_sigmaMax, __pyx_k_sigmaMax, sizeof(__pyx_k_sigmaMax), 0, 0, 1, 1},
36036  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
36037  {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
36038  {&__pyx_n_s_step, __pyx_k_step, sizeof(__pyx_k_step), 0, 0, 1, 1},
36039  {&__pyx_n_s_stop, __pyx_k_stop, sizeof(__pyx_k_stop), 0, 0, 1, 1},
36040  {&__pyx_kp_s_strided_and_direct, __pyx_k_strided_and_direct, sizeof(__pyx_k_strided_and_direct), 0, 0, 1, 0},
36041  {&__pyx_kp_s_strided_and_direct_or_indirect, __pyx_k_strided_and_direct_or_indirect, sizeof(__pyx_k_strided_and_direct_or_indirect), 0, 0, 1, 0},
36042  {&__pyx_kp_s_strided_and_indirect, __pyx_k_strided_and_indirect, sizeof(__pyx_k_strided_and_indirect), 0, 0, 1, 0},
36043  {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
36044  {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1},
36045  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
36046  {&__pyx_n_s_triangleFlag, __pyx_k_triangleFlag, sizeof(__pyx_k_triangleFlag), 0, 0, 1, 1},
36047  {&__pyx_kp_s_unable_to_allocate_array_data, __pyx_k_unable_to_allocate_array_data, sizeof(__pyx_k_unable_to_allocate_array_data), 0, 0, 1, 0},
36048  {&__pyx_kp_s_unable_to_allocate_shape_and_str, __pyx_k_unable_to_allocate_shape_and_str, sizeof(__pyx_k_unable_to_allocate_shape_and_str), 0, 0, 1, 0},
36049  {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0},
36050  {&__pyx_n_s_unpack, __pyx_k_unpack, sizeof(__pyx_k_unpack), 0, 0, 1, 1},
36051  {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
36052  {&__pyx_n_s_volume, __pyx_k_volume, sizeof(__pyx_k_volume), 0, 0, 1, 1},
36053  {&__pyx_n_s_weights, __pyx_k_weights, sizeof(__pyx_k_weights), 0, 0, 1, 1},
36054  {&__pyx_kp_s_wrong_nLevels, __pyx_k_wrong_nLevels, sizeof(__pyx_k_wrong_nLevels), 0, 0, 1, 0},
36055  {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1},
36056  {0, 0, 0, 0, 0, 0, 0}
36057 };
36058 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
36059  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error)
36060  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 214, __pyx_L1_error)
36061  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(3, 272, __pyx_L1_error)
36062  __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(3, 856, __pyx_L1_error)
36063  __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(3, 1038, __pyx_L1_error)
36064  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(0, 148, __pyx_L1_error)
36065  __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 151, __pyx_L1_error)
36066  __pyx_builtin_Ellipsis = __Pyx_GetBuiltinName(__pyx_n_s_Ellipsis); if (!__pyx_builtin_Ellipsis) __PYX_ERR(0, 400, __pyx_L1_error)
36067  __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 609, __pyx_L1_error)
36068  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 828, __pyx_L1_error)
36069  return 0;
36070  __pyx_L1_error:;
36071  return -1;
36072 }
36073 
36074 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
36075  __Pyx_RefNannyDeclarations
36076  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
36077 
36078  /* "cmeshTools.pyx":34
36079  * self.nodeElementOffsets = np.asarray(<int[:self.mesh.nNodes_global+1]> self.mesh.nodeElementOffsets)
36080  * else:
36081  * self.nodeElementsArray = np.empty(0, dtype=np.int32) # <<<<<<<<<<<<<<
36082  * self.nodeElementOffsets = np.empty(0, dtype=np.int32)
36083  *
36084  */
36085  __pyx_tuple_ = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 34, __pyx_L1_error)
36086  __Pyx_GOTREF(__pyx_tuple_);
36087  __Pyx_GIVEREF(__pyx_tuple_);
36088 
36089  /* "(tree fragment)":2
36090  * def __reduce_cython__(self):
36091  * raise TypeError("self.mesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
36092  * def __setstate_cython__(self, __pyx_state):
36093  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
36094  */
36095  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_self_mesh_cannot_be_converted_to); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 2, __pyx_L1_error)
36096  __Pyx_GOTREF(__pyx_tuple__2);
36097  __Pyx_GIVEREF(__pyx_tuple__2);
36098 
36099  /* "(tree fragment)":4
36100  * raise TypeError("self.mesh cannot be converted to a Python object for pickling")
36101  * def __setstate_cython__(self, __pyx_state):
36102  * raise TypeError("self.mesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
36103  */
36104  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_self_mesh_cannot_be_converted_to); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 4, __pyx_L1_error)
36105  __Pyx_GOTREF(__pyx_tuple__3);
36106  __Pyx_GIVEREF(__pyx_tuple__3);
36107 
36108  /* "(tree fragment)":2
36109  * def __reduce_cython__(self):
36110  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
36111  * def __setstate_cython__(self, __pyx_state):
36112  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
36113  */
36114  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_self_multilevelMesh_cannot_be_co); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 2, __pyx_L1_error)
36115  __Pyx_GOTREF(__pyx_tuple__4);
36116  __Pyx_GIVEREF(__pyx_tuple__4);
36117 
36118  /* "(tree fragment)":4
36119  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling")
36120  * def __setstate_cython__(self, __pyx_state):
36121  * raise TypeError("self.multilevelMesh cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<<
36122  */
36123  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_self_multilevelMesh_cannot_be_co); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 4, __pyx_L1_error)
36124  __Pyx_GOTREF(__pyx_tuple__5);
36125  __Pyx_GIVEREF(__pyx_tuple__5);
36126 
36127  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272
36128  * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS)
36129  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)):
36130  * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<<
36131  *
36132  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
36133  */
36134  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(3, 272, __pyx_L1_error)
36135  __Pyx_GOTREF(__pyx_tuple__6);
36136  __Pyx_GIVEREF(__pyx_tuple__6);
36137 
36138  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276
36139  * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS)
36140  * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)):
36141  * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<<
36142  *
36143  * info.buf = PyArray_DATA(self)
36144  */
36145  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(3, 276, __pyx_L1_error)
36146  __Pyx_GOTREF(__pyx_tuple__7);
36147  __Pyx_GIVEREF(__pyx_tuple__7);
36148 
36149  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306
36150  * if ((descr.byteorder == c'>' and little_endian) or
36151  * (descr.byteorder == c'<' and not little_endian)):
36152  * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<<
36153  * if t == NPY_BYTE: f = "b"
36154  * elif t == NPY_UBYTE: f = "B"
36155  */
36156  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(3, 306, __pyx_L1_error)
36157  __Pyx_GOTREF(__pyx_tuple__8);
36158  __Pyx_GIVEREF(__pyx_tuple__8);
36159 
36160  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856
36161  *
36162  * if (end - f) - <int>(new_offset - offset[0]) < 15:
36163  * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<<
36164  *
36165  * if ((child.byteorder == c'>' and little_endian) or
36166  */
36167  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(3, 856, __pyx_L1_error)
36168  __Pyx_GOTREF(__pyx_tuple__9);
36169  __Pyx_GIVEREF(__pyx_tuple__9);
36170 
36171  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880
36172  * t = child.type_num
36173  * if end - f < 5:
36174  * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<<
36175  *
36176  * # Until ticket #99 is fixed, use integers to avoid warnings
36177  */
36178  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(3, 880, __pyx_L1_error)
36179  __Pyx_GOTREF(__pyx_tuple__10);
36180  __Pyx_GIVEREF(__pyx_tuple__10);
36181 
36182  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038
36183  * _import_array()
36184  * except Exception:
36185  * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<<
36186  *
36187  * cdef inline int import_umath() except -1:
36188  */
36189  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(3, 1038, __pyx_L1_error)
36190  __Pyx_GOTREF(__pyx_tuple__11);
36191  __Pyx_GIVEREF(__pyx_tuple__11);
36192 
36193  /* "linux/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044
36194  * _import_umath()
36195  * except Exception:
36196  * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<<
36197  *
36198  * cdef inline int import_ufunc() except -1:
36199  */
36200  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(3, 1044, __pyx_L1_error)
36201  __Pyx_GOTREF(__pyx_tuple__12);
36202  __Pyx_GIVEREF(__pyx_tuple__12);
36203 
36204  /* "View.MemoryView":133
36205  *
36206  * if not self.ndim:
36207  * raise ValueError("Empty shape tuple for cython.array") # <<<<<<<<<<<<<<
36208  *
36209  * if itemsize <= 0:
36210  */
36211  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_Empty_shape_tuple_for_cython_arr); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 133, __pyx_L1_error)
36212  __Pyx_GOTREF(__pyx_tuple__13);
36213  __Pyx_GIVEREF(__pyx_tuple__13);
36214 
36215  /* "View.MemoryView":136
36216  *
36217  * if itemsize <= 0:
36218  * raise ValueError("itemsize <= 0 for cython.array") # <<<<<<<<<<<<<<
36219  *
36220  * if not isinstance(format, bytes):
36221  */
36222  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_itemsize_0_for_cython_array); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 136, __pyx_L1_error)
36223  __Pyx_GOTREF(__pyx_tuple__14);
36224  __Pyx_GIVEREF(__pyx_tuple__14);
36225 
36226  /* "View.MemoryView":148
36227  *
36228  * if not self._shape:
36229  * raise MemoryError("unable to allocate shape and strides.") # <<<<<<<<<<<<<<
36230  *
36231  *
36232  */
36233  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_shape_and_str); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 148, __pyx_L1_error)
36234  __Pyx_GOTREF(__pyx_tuple__15);
36235  __Pyx_GIVEREF(__pyx_tuple__15);
36236 
36237  /* "View.MemoryView":176
36238  * self.data = <char *>malloc(self.len)
36239  * if not self.data:
36240  * raise MemoryError("unable to allocate array data.") # <<<<<<<<<<<<<<
36241  *
36242  * if self.dtype_is_object:
36243  */
36244  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_unable_to_allocate_array_data); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 176, __pyx_L1_error)
36245  __Pyx_GOTREF(__pyx_tuple__16);
36246  __Pyx_GIVEREF(__pyx_tuple__16);
36247 
36248  /* "View.MemoryView":192
36249  * bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS
36250  * if not (flags & bufmode):
36251  * raise ValueError("Can only create a buffer that is contiguous in memory.") # <<<<<<<<<<<<<<
36252  * info.buf = self.data
36253  * info.len = self.len
36254  */
36255  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_Can_only_create_a_buffer_that_is); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 192, __pyx_L1_error)
36256  __Pyx_GOTREF(__pyx_tuple__17);
36257  __Pyx_GIVEREF(__pyx_tuple__17);
36258 
36259  /* "(tree fragment)":2
36260  * def __reduce_cython__(self):
36261  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
36262  * def __setstate_cython__(self, __pyx_state):
36263  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
36264  */
36265  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 2, __pyx_L1_error)
36266  __Pyx_GOTREF(__pyx_tuple__18);
36267  __Pyx_GIVEREF(__pyx_tuple__18);
36268 
36269  /* "(tree fragment)":4
36270  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
36271  * def __setstate_cython__(self, __pyx_state):
36272  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
36273  */
36274  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 4, __pyx_L1_error)
36275  __Pyx_GOTREF(__pyx_tuple__19);
36276  __Pyx_GIVEREF(__pyx_tuple__19);
36277 
36278  /* "View.MemoryView":414
36279  * def __setitem__(memoryview self, object index, object value):
36280  * if self.view.readonly:
36281  * raise TypeError("Cannot assign to read-only memoryview") # <<<<<<<<<<<<<<
36282  *
36283  * have_slices, index = _unellipsify(index, self.view.ndim)
36284  */
36285  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_Cannot_assign_to_read_only_memor); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 414, __pyx_L1_error)
36286  __Pyx_GOTREF(__pyx_tuple__20);
36287  __Pyx_GIVEREF(__pyx_tuple__20);
36288 
36289  /* "View.MemoryView":491
36290  * result = struct.unpack(self.view.format, bytesitem)
36291  * except struct.error:
36292  * raise ValueError("Unable to convert item to object") # <<<<<<<<<<<<<<
36293  * else:
36294  * if len(self.view.format) == 1:
36295  */
36296  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_Unable_to_convert_item_to_object); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 491, __pyx_L1_error)
36297  __Pyx_GOTREF(__pyx_tuple__21);
36298  __Pyx_GIVEREF(__pyx_tuple__21);
36299 
36300  /* "View.MemoryView":516
36301  * def __getbuffer__(self, Py_buffer *info, int flags):
36302  * if flags & PyBUF_WRITABLE and self.view.readonly:
36303  * raise ValueError("Cannot create writable memory view from read-only memoryview") # <<<<<<<<<<<<<<
36304  *
36305  * if flags & PyBUF_ND:
36306  */
36307  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_writable_memory_vi); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 516, __pyx_L1_error)
36308  __Pyx_GOTREF(__pyx_tuple__22);
36309  __Pyx_GIVEREF(__pyx_tuple__22);
36310 
36311  /* "View.MemoryView":566
36312  * if self.view.strides == NULL:
36313  *
36314  * raise ValueError("Buffer view does not expose strides") # <<<<<<<<<<<<<<
36315  *
36316  * return tuple([stride for stride in self.view.strides[:self.view.ndim]])
36317  */
36318  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_Buffer_view_does_not_expose_stri); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 566, __pyx_L1_error)
36319  __Pyx_GOTREF(__pyx_tuple__23);
36320  __Pyx_GIVEREF(__pyx_tuple__23);
36321 
36322  /* "View.MemoryView":573
36323  * def suboffsets(self):
36324  * if self.view.suboffsets == NULL:
36325  * return (-1,) * self.view.ndim # <<<<<<<<<<<<<<
36326  *
36327  * return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]])
36328  */
36329  __pyx_tuple__24 = PyTuple_New(1); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 573, __pyx_L1_error)
36330  __Pyx_GOTREF(__pyx_tuple__24);
36331  __Pyx_INCREF(__pyx_int_neg_1);
36332  __Pyx_GIVEREF(__pyx_int_neg_1);
36333  PyTuple_SET_ITEM(__pyx_tuple__24, 0, __pyx_int_neg_1);
36334  __Pyx_GIVEREF(__pyx_tuple__24);
36335 
36336  /* "(tree fragment)":2
36337  * def __reduce_cython__(self):
36338  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
36339  * def __setstate_cython__(self, __pyx_state):
36340  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
36341  */
36342  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 2, __pyx_L1_error)
36343  __Pyx_GOTREF(__pyx_tuple__25);
36344  __Pyx_GIVEREF(__pyx_tuple__25);
36345 
36346  /* "(tree fragment)":4
36347  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
36348  * def __setstate_cython__(self, __pyx_state):
36349  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
36350  */
36351  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 4, __pyx_L1_error)
36352  __Pyx_GOTREF(__pyx_tuple__26);
36353  __Pyx_GIVEREF(__pyx_tuple__26);
36354 
36355  /* "View.MemoryView":678
36356  * if item is Ellipsis:
36357  * if not seen_ellipsis:
36358  * result.extend([slice(None)] * (ndim - len(tup) + 1)) # <<<<<<<<<<<<<<
36359  * seen_ellipsis = True
36360  * else:
36361  */
36362  __pyx_slice__27 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__27)) __PYX_ERR(0, 678, __pyx_L1_error)
36363  __Pyx_GOTREF(__pyx_slice__27);
36364  __Pyx_GIVEREF(__pyx_slice__27);
36365 
36366  /* "View.MemoryView":699
36367  * for suboffset in suboffsets[:ndim]:
36368  * if suboffset >= 0:
36369  * raise ValueError("Indirect dimensions not supported") # <<<<<<<<<<<<<<
36370  *
36371  *
36372  */
36373  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_Indirect_dimensions_not_supporte); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 699, __pyx_L1_error)
36374  __Pyx_GOTREF(__pyx_tuple__28);
36375  __Pyx_GIVEREF(__pyx_tuple__28);
36376 
36377  /* "(tree fragment)":2
36378  * def __reduce_cython__(self):
36379  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
36380  * def __setstate_cython__(self, __pyx_state):
36381  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
36382  */
36383  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 2, __pyx_L1_error)
36384  __Pyx_GOTREF(__pyx_tuple__29);
36385  __Pyx_GIVEREF(__pyx_tuple__29);
36386 
36387  /* "(tree fragment)":4
36388  * raise TypeError("no default __reduce__ due to non-trivial __cinit__")
36389  * def __setstate_cython__(self, __pyx_state):
36390  * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<<
36391  */
36392  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 4, __pyx_L1_error)
36393  __Pyx_GOTREF(__pyx_tuple__30);
36394  __Pyx_GIVEREF(__pyx_tuple__30);
36395 
36396  /* "cmeshTools.pyx":117
36397  * self.volume = self.mesh.volume
36398  *
36399  * def buildPythonMeshInterface(cmesh): # <<<<<<<<<<<<<<
36400  * """
36401  * function to be conform to old module, and to calls from MeshTools
36402  */
36403  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_cmesh); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(1, 117, __pyx_L1_error)
36404  __Pyx_GOTREF(__pyx_tuple__36);
36405  __Pyx_GIVEREF(__pyx_tuple__36);
36406  __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cmeshTools_pyx, __pyx_n_s_buildPythonMeshInterface, 117, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(1, 117, __pyx_L1_error)
36407 
36408  /* "cmeshTools.pyx":173
36409  * cmesh.volume)
36410  *
36411  * def buildPythonMeshInterfaceNoArrays(cmesh): # <<<<<<<<<<<<<<
36412  * """
36413  * function to be conform to old module, and to calls from MeshTools
36414  */
36415  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_cmesh); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 173, __pyx_L1_error)
36416  __Pyx_GOTREF(__pyx_tuple__38);
36417  __Pyx_GIVEREF(__pyx_tuple__38);
36418  __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cmeshTools_pyx, __pyx_n_s_buildPythonMeshInterfaceNoArrays, 173, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(1, 173, __pyx_L1_error)
36419 
36420  /* "cmeshTools.pyx":297
36421  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
36422  *
36423  * def buildPythonMultilevelMeshInterface(cmultilevelMesh): # <<<<<<<<<<<<<<
36424  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
36425  * return (cmultilevelMesh.nLevels,
36426  */
36427  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_n_s_cmultilevelMesh); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(1, 297, __pyx_L1_error)
36428  __Pyx_GOTREF(__pyx_tuple__40);
36429  __Pyx_GIVEREF(__pyx_tuple__40);
36430  __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cmeshTools_pyx, __pyx_n_s_buildPythonMultilevelMeshInterfa, 297, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(1, 297, __pyx_L1_error)
36431 
36432  /* "cmeshTools.pyx":491
36433  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
36434  *
36435  * def locallyRefineMultilevelMesh(int nSpace, # <<<<<<<<<<<<<<
36436  * CMultilevelMesh cmultilevelMesh,
36437  * np.ndarray elementTagArray,
36438  */
36439  __pyx_tuple__42 = PyTuple_Pack(6, __pyx_n_s_nSpace, __pyx_n_s_cmultilevelMesh, __pyx_n_s_elementTagArray, __pyx_n_s_refineTypeFlag, __pyx_n_s_failed, __pyx_n_s_finestLevel); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(1, 491, __pyx_L1_error)
36440  __Pyx_GOTREF(__pyx_tuple__42);
36441  __Pyx_GIVEREF(__pyx_tuple__42);
36442  __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cmeshTools_pyx, __pyx_n_s_locallyRefineMultilevelMesh, 491, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(1, 491, __pyx_L1_error)
36443 
36444  /* "cmeshTools.pyx":529
36445  * print("locallyRefine nSpace= {0:d} not implemented! Returning.".format(nSpace))
36446  *
36447  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh): # <<<<<<<<<<<<<<
36448  * if nSpace == 2:
36449  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
36450  */
36451  __pyx_tuple__44 = PyTuple_Pack(3, __pyx_n_s_nSpace, __pyx_n_s_cmultilevelMesh, __pyx_n_s_failed); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(1, 529, __pyx_L1_error)
36452  __Pyx_GOTREF(__pyx_tuple__44);
36453  __Pyx_GIVEREF(__pyx_tuple__44);
36454  __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_proteus_cmeshTools_pyx, __pyx_n_s_setNewestNodeBases, 529, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(1, 529, __pyx_L1_error)
36455 
36456  /* "View.MemoryView":286
36457  * return self.name
36458  *
36459  * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
36460  * cdef strided = Enum("<strided and direct>") # default
36461  * cdef indirect = Enum("<strided and indirect>")
36462  */
36463  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct_or_indirect); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 286, __pyx_L1_error)
36464  __Pyx_GOTREF(__pyx_tuple__46);
36465  __Pyx_GIVEREF(__pyx_tuple__46);
36466 
36467  /* "View.MemoryView":287
36468  *
36469  * cdef generic = Enum("<strided and direct or indirect>")
36470  * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
36471  * cdef indirect = Enum("<strided and indirect>")
36472  *
36473  */
36474  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_strided_and_direct); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 287, __pyx_L1_error)
36475  __Pyx_GOTREF(__pyx_tuple__47);
36476  __Pyx_GIVEREF(__pyx_tuple__47);
36477 
36478  /* "View.MemoryView":288
36479  * cdef generic = Enum("<strided and direct or indirect>")
36480  * cdef strided = Enum("<strided and direct>") # default
36481  * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
36482  *
36483  *
36484  */
36485  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_strided_and_indirect); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 288, __pyx_L1_error)
36486  __Pyx_GOTREF(__pyx_tuple__48);
36487  __Pyx_GIVEREF(__pyx_tuple__48);
36488 
36489  /* "View.MemoryView":291
36490  *
36491  *
36492  * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
36493  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
36494  *
36495  */
36496  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_direct); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 291, __pyx_L1_error)
36497  __Pyx_GOTREF(__pyx_tuple__49);
36498  __Pyx_GIVEREF(__pyx_tuple__49);
36499 
36500  /* "View.MemoryView":292
36501  *
36502  * cdef contiguous = Enum("<contiguous and direct>")
36503  * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
36504  *
36505  *
36506  */
36507  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_contiguous_and_indirect); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 292, __pyx_L1_error)
36508  __Pyx_GOTREF(__pyx_tuple__50);
36509  __Pyx_GIVEREF(__pyx_tuple__50);
36510 
36511  /* "(tree fragment)":1
36512  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
36513  * cdef object __pyx_PickleError
36514  * cdef object __pyx_result
36515  */
36516  __pyx_tuple__51 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1, __pyx_L1_error)
36517  __Pyx_GOTREF(__pyx_tuple__51);
36518  __Pyx_GIVEREF(__pyx_tuple__51);
36519  __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Enum, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 1, __pyx_L1_error)
36520  __Pyx_RefNannyFinishContext();
36521  return 0;
36522  __pyx_L1_error:;
36523  __Pyx_RefNannyFinishContext();
36524  return -1;
36525 }
36526 
36527 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
36528  if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
36529  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(1, 1, __pyx_L1_error)
36530  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(1, 1, __pyx_L1_error)
36531  __pyx_int_184977713 = PyInt_FromLong(184977713L); if (unlikely(!__pyx_int_184977713)) __PYX_ERR(1, 1, __pyx_L1_error)
36532  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(1, 1, __pyx_L1_error)
36533  return 0;
36534  __pyx_L1_error:;
36535  return -1;
36536 }
36537 
36538 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
36539 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
36540 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
36541 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
36542 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
36543 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
36544 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
36545 
36546 static int __Pyx_modinit_global_init_code(void) {
36547  __Pyx_RefNannyDeclarations
36548  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
36549  /*--- Global init code ---*/
36550  generic = Py_None; Py_INCREF(Py_None);
36551  strided = Py_None; Py_INCREF(Py_None);
36552  indirect = Py_None; Py_INCREF(Py_None);
36553  contiguous = Py_None; Py_INCREF(Py_None);
36554  indirect_contiguous = Py_None; Py_INCREF(Py_None);
36555  __Pyx_RefNannyFinishContext();
36556  return 0;
36557 }
36558 
36559 static int __Pyx_modinit_variable_export_code(void) {
36560  __Pyx_RefNannyDeclarations
36561  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
36562  /*--- Variable export code ---*/
36563  __Pyx_RefNannyFinishContext();
36564  return 0;
36565 }
36566 
36567 static int __Pyx_modinit_function_export_code(void) {
36568  __Pyx_RefNannyDeclarations
36569  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
36570  /*--- Function export code ---*/
36571  __Pyx_RefNannyFinishContext();
36572  return 0;
36573 }
36574 
36575 static int __Pyx_modinit_type_init_code(void) {
36576  __Pyx_RefNannyDeclarations
36577  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
36578  /*--- Type init code ---*/
36579  if (PyType_Ready(&__pyx_type_10cmeshTools_CMesh) < 0) __PYX_ERR(1, 11, __pyx_L1_error)
36580  __pyx_type_10cmeshTools_CMesh.tp_print = 0;
36581  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10cmeshTools_CMesh.tp_dictoffset && __pyx_type_10cmeshTools_CMesh.tp_getattro == PyObject_GenericGetAttr)) {
36582  __pyx_type_10cmeshTools_CMesh.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36583  }
36584  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CMesh, (PyObject *)&__pyx_type_10cmeshTools_CMesh) < 0) __PYX_ERR(1, 11, __pyx_L1_error)
36585  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_10cmeshTools_CMesh) < 0) __PYX_ERR(1, 11, __pyx_L1_error)
36586  __pyx_ptype_10cmeshTools_CMesh = &__pyx_type_10cmeshTools_CMesh;
36587  if (PyType_Ready(&__pyx_type_10cmeshTools_CMultilevelMesh) < 0) __PYX_ERR(1, 199, __pyx_L1_error)
36588  __pyx_type_10cmeshTools_CMultilevelMesh.tp_print = 0;
36589  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_10cmeshTools_CMultilevelMesh.tp_dictoffset && __pyx_type_10cmeshTools_CMultilevelMesh.tp_getattro == PyObject_GenericGetAttr)) {
36590  __pyx_type_10cmeshTools_CMultilevelMesh.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36591  }
36592  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CMultilevelMesh, (PyObject *)&__pyx_type_10cmeshTools_CMultilevelMesh) < 0) __PYX_ERR(1, 199, __pyx_L1_error)
36593  if (__Pyx_setup_reduce((PyObject*)&__pyx_type_10cmeshTools_CMultilevelMesh) < 0) __PYX_ERR(1, 199, __pyx_L1_error)
36594  __pyx_ptype_10cmeshTools_CMultilevelMesh = &__pyx_type_10cmeshTools_CMultilevelMesh;
36595  __pyx_vtabptr_array = &__pyx_vtable_array;
36596  __pyx_vtable_array.get_memview = (PyObject *(*)(struct __pyx_array_obj *))__pyx_array_get_memview;
36597  if (PyType_Ready(&__pyx_type___pyx_array) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
36598  __pyx_type___pyx_array.tp_print = 0;
36599  if (__Pyx_SetVtable(__pyx_type___pyx_array.tp_dict, __pyx_vtabptr_array) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
36600  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_array) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
36601  __pyx_array_type = &__pyx_type___pyx_array;
36602  if (PyType_Ready(&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
36603  __pyx_type___pyx_MemviewEnum.tp_print = 0;
36604  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_MemviewEnum.tp_dictoffset && __pyx_type___pyx_MemviewEnum.tp_getattro == PyObject_GenericGetAttr)) {
36605  __pyx_type___pyx_MemviewEnum.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36606  }
36607  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_MemviewEnum) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
36608  __pyx_MemviewEnum_type = &__pyx_type___pyx_MemviewEnum;
36609  __pyx_vtabptr_memoryview = &__pyx_vtable_memoryview;
36610  __pyx_vtable_memoryview.get_item_pointer = (char *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_get_item_pointer;
36611  __pyx_vtable_memoryview.is_slice = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_is_slice;
36612  __pyx_vtable_memoryview.setitem_slice_assignment = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_slice_assignment;
36613  __pyx_vtable_memoryview.setitem_slice_assign_scalar = (PyObject *(*)(struct __pyx_memoryview_obj *, struct __pyx_memoryview_obj *, PyObject *))__pyx_memoryview_setitem_slice_assign_scalar;
36614  __pyx_vtable_memoryview.setitem_indexed = (PyObject *(*)(struct __pyx_memoryview_obj *, PyObject *, PyObject *))__pyx_memoryview_setitem_indexed;
36615  __pyx_vtable_memoryview.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryview_convert_item_to_object;
36616  __pyx_vtable_memoryview.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryview_assign_item_from_object;
36617  if (PyType_Ready(&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
36618  __pyx_type___pyx_memoryview.tp_print = 0;
36619  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryview.tp_dictoffset && __pyx_type___pyx_memoryview.tp_getattro == PyObject_GenericGetAttr)) {
36620  __pyx_type___pyx_memoryview.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36621  }
36622  if (__Pyx_SetVtable(__pyx_type___pyx_memoryview.tp_dict, __pyx_vtabptr_memoryview) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
36623  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryview) < 0) __PYX_ERR(0, 330, __pyx_L1_error)
36624  __pyx_memoryview_type = &__pyx_type___pyx_memoryview;
36625  __pyx_vtabptr__memoryviewslice = &__pyx_vtable__memoryviewslice;
36626  __pyx_vtable__memoryviewslice.__pyx_base = *__pyx_vtabptr_memoryview;
36627  __pyx_vtable__memoryviewslice.__pyx_base.convert_item_to_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *))__pyx_memoryviewslice_convert_item_to_object;
36628  __pyx_vtable__memoryviewslice.__pyx_base.assign_item_from_object = (PyObject *(*)(struct __pyx_memoryview_obj *, char *, PyObject *))__pyx_memoryviewslice_assign_item_from_object;
36629  __pyx_type___pyx_memoryviewslice.tp_base = __pyx_memoryview_type;
36630  if (PyType_Ready(&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
36631  __pyx_type___pyx_memoryviewslice.tp_print = 0;
36632  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type___pyx_memoryviewslice.tp_dictoffset && __pyx_type___pyx_memoryviewslice.tp_getattro == PyObject_GenericGetAttr)) {
36633  __pyx_type___pyx_memoryviewslice.tp_getattro = __Pyx_PyObject_GenericGetAttr;
36634  }
36635  if (__Pyx_SetVtable(__pyx_type___pyx_memoryviewslice.tp_dict, __pyx_vtabptr__memoryviewslice) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
36636  if (__Pyx_setup_reduce((PyObject*)&__pyx_type___pyx_memoryviewslice) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
36637  __pyx_memoryviewslice_type = &__pyx_type___pyx_memoryviewslice;
36638  __Pyx_RefNannyFinishContext();
36639  return 0;
36640  __pyx_L1_error:;
36641  __Pyx_RefNannyFinishContext();
36642  return -1;
36643 }
36644 
36645 static int __Pyx_modinit_type_import_code(void) {
36646  __Pyx_RefNannyDeclarations
36647  PyObject *__pyx_t_1 = NULL;
36648  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
36649  /*--- Type import code ---*/
36650  __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error)
36651  __Pyx_GOTREF(__pyx_t_1);
36652  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
36653  #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
36654  sizeof(PyTypeObject),
36655  #else
36656  sizeof(PyHeapTypeObject),
36657  #endif
36658  __Pyx_ImportType_CheckSize_Warn);
36659  if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error)
36660  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36661  __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 206, __pyx_L1_error)
36662  __Pyx_GOTREF(__pyx_t_1);
36663  __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore);
36664  if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(3, 206, __pyx_L1_error)
36665  __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn);
36666  if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(3, 229, __pyx_L1_error)
36667  __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn);
36668  if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(3, 233, __pyx_L1_error)
36669  __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore);
36670  if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(3, 242, __pyx_L1_error)
36671  __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn);
36672  if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(3, 918, __pyx_L1_error)
36673  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36674  __Pyx_RefNannyFinishContext();
36675  return 0;
36676  __pyx_L1_error:;
36677  __Pyx_XDECREF(__pyx_t_1);
36678  __Pyx_RefNannyFinishContext();
36679  return -1;
36680 }
36681 
36682 static int __Pyx_modinit_variable_import_code(void) {
36683  __Pyx_RefNannyDeclarations
36684  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
36685  /*--- Variable import code ---*/
36686  __Pyx_RefNannyFinishContext();
36687  return 0;
36688 }
36689 
36690 static int __Pyx_modinit_function_import_code(void) {
36691  __Pyx_RefNannyDeclarations
36692  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
36693  /*--- Function import code ---*/
36694  __Pyx_RefNannyFinishContext();
36695  return 0;
36696 }
36697 
36698 
36699 #if PY_MAJOR_VERSION < 3
36700 #ifdef CYTHON_NO_PYINIT_EXPORT
36701 #define __Pyx_PyMODINIT_FUNC void
36702 #else
36703 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
36704 #endif
36705 #else
36706 #ifdef CYTHON_NO_PYINIT_EXPORT
36707 #define __Pyx_PyMODINIT_FUNC PyObject *
36708 #else
36709 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
36710 #endif
36711 #endif
36712 
36713 
36714 #if PY_MAJOR_VERSION < 3
36715 __Pyx_PyMODINIT_FUNC initcmeshTools(void) CYTHON_SMALL_CODE; /*proto*/
36716 __Pyx_PyMODINIT_FUNC initcmeshTools(void)
36717 #else
36718 __Pyx_PyMODINIT_FUNC PyInit_cmeshTools(void) CYTHON_SMALL_CODE; /*proto*/
36719 __Pyx_PyMODINIT_FUNC PyInit_cmeshTools(void)
36720 #if CYTHON_PEP489_MULTI_PHASE_INIT
36721 {
36722  return PyModuleDef_Init(&__pyx_moduledef);
36723 }
36724 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
36725  #if PY_VERSION_HEX >= 0x030700A1
36726  static PY_INT64_T main_interpreter_id = -1;
36727  PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
36728  if (main_interpreter_id == -1) {
36729  main_interpreter_id = current_id;
36730  return (unlikely(current_id == -1)) ? -1 : 0;
36731  } else if (unlikely(main_interpreter_id != current_id))
36732  #else
36733  static PyInterpreterState *main_interpreter = NULL;
36734  PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
36735  if (!main_interpreter) {
36736  main_interpreter = current_interpreter;
36737  } else if (unlikely(main_interpreter != current_interpreter))
36738  #endif
36739  {
36740  PyErr_SetString(
36741  PyExc_ImportError,
36742  "Interpreter change detected - this module can only be loaded into one interpreter per process.");
36743  return -1;
36744  }
36745  return 0;
36746 }
36747 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) {
36748  PyObject *value = PyObject_GetAttrString(spec, from_name);
36749  int result = 0;
36750  if (likely(value)) {
36751  if (allow_none || value != Py_None) {
36752  result = PyDict_SetItemString(moddict, to_name, value);
36753  }
36754  Py_DECREF(value);
36755  } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
36756  PyErr_Clear();
36757  } else {
36758  result = -1;
36759  }
36760  return result;
36761 }
36762 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
36763  PyObject *module = NULL, *moddict, *modname;
36764  if (__Pyx_check_single_interpreter())
36765  return NULL;
36766  if (__pyx_m)
36767  return __Pyx_NewRef(__pyx_m);
36768  modname = PyObject_GetAttrString(spec, "name");
36769  if (unlikely(!modname)) goto bad;
36770  module = PyModule_NewObject(modname);
36771  Py_DECREF(modname);
36772  if (unlikely(!module)) goto bad;
36773  moddict = PyModule_GetDict(module);
36774  if (unlikely(!moddict)) goto bad;
36775  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
36776  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
36777  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
36778  if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
36779  return module;
36780 bad:
36781  Py_XDECREF(module);
36782  return NULL;
36783 }
36784 
36785 
36786 static CYTHON_SMALL_CODE int __pyx_pymod_exec_cmeshTools(PyObject *__pyx_pyinit_module)
36787 #endif
36788 #endif
36789 {
36790  PyObject *__pyx_t_1 = NULL;
36791  PyObject *__pyx_t_2 = NULL;
36792  static PyThread_type_lock __pyx_t_3[8];
36793  __Pyx_RefNannyDeclarations
36794  #if CYTHON_PEP489_MULTI_PHASE_INIT
36795  if (__pyx_m) {
36796  if (__pyx_m == __pyx_pyinit_module) return 0;
36797  PyErr_SetString(PyExc_RuntimeError, "Module 'cmeshTools' has already been imported. Re-initialisation is not supported.");
36798  return -1;
36799  }
36800  #elif PY_MAJOR_VERSION >= 3
36801  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
36802  #endif
36803  #if CYTHON_REFNANNY
36804 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
36805 if (!__Pyx_RefNanny) {
36806  PyErr_Clear();
36807  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
36808  if (!__Pyx_RefNanny)
36809  Py_FatalError("failed to import 'refnanny' module");
36810 }
36811 #endif
36812  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_cmeshTools(void)", 0);
36813  if (__Pyx_check_binary_version() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36814  #ifdef __Pxy_PyFrame_Initialize_Offsets
36815  __Pxy_PyFrame_Initialize_Offsets();
36816  #endif
36817  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(1, 1, __pyx_L1_error)
36818  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(1, 1, __pyx_L1_error)
36819  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(1, 1, __pyx_L1_error)
36820  #ifdef __Pyx_CyFunction_USED
36821  if (__pyx_CyFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36822  #endif
36823  #ifdef __Pyx_FusedFunction_USED
36824  if (__pyx_FusedFunction_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36825  #endif
36826  #ifdef __Pyx_Coroutine_USED
36827  if (__pyx_Coroutine_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36828  #endif
36829  #ifdef __Pyx_Generator_USED
36830  if (__pyx_Generator_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36831  #endif
36832  #ifdef __Pyx_AsyncGen_USED
36833  if (__pyx_AsyncGen_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36834  #endif
36835  #ifdef __Pyx_StopAsyncIteration_USED
36836  if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36837  #endif
36838  /*--- Library function declarations ---*/
36839  /*--- Threads initialization code ---*/
36840  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
36841  #ifdef WITH_THREAD /* Python build with threading support? */
36842  PyEval_InitThreads();
36843  #endif
36844  #endif
36845  /*--- Module creation code ---*/
36846  #if CYTHON_PEP489_MULTI_PHASE_INIT
36847  __pyx_m = __pyx_pyinit_module;
36848  Py_INCREF(__pyx_m);
36849  #else
36850  #if PY_MAJOR_VERSION < 3
36851  __pyx_m = Py_InitModule4("cmeshTools", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
36852  #else
36853  __pyx_m = PyModule_Create(&__pyx_moduledef);
36854  #endif
36855  if (unlikely(!__pyx_m)) __PYX_ERR(1, 1, __pyx_L1_error)
36856  #endif
36857  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(1, 1, __pyx_L1_error)
36858  Py_INCREF(__pyx_d);
36859  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(1, 1, __pyx_L1_error)
36860  __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(1, 1, __pyx_L1_error)
36861  #if CYTHON_COMPILING_IN_PYPY
36862  Py_INCREF(__pyx_b);
36863  #endif
36864  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(1, 1, __pyx_L1_error);
36865  /*--- Initialize various global constants etc. ---*/
36866  if (__Pyx_InitGlobals() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36867  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
36868  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36869  #endif
36870  if (__pyx_module_is_main_cmeshTools) {
36871  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36872  }
36873  #if PY_MAJOR_VERSION >= 3
36874  {
36875  PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(1, 1, __pyx_L1_error)
36876  if (!PyDict_GetItemString(modules, "cmeshTools")) {
36877  if (unlikely(PyDict_SetItemString(modules, "cmeshTools", __pyx_m) < 0)) __PYX_ERR(1, 1, __pyx_L1_error)
36878  }
36879  }
36880  #endif
36881  /*--- Builtin init code ---*/
36882  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36883  /*--- Constants init code ---*/
36884  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36885  /*--- Global type/function init code ---*/
36886  (void)__Pyx_modinit_global_init_code();
36887  (void)__Pyx_modinit_variable_export_code();
36888  (void)__Pyx_modinit_function_export_code();
36889  if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error;
36890  if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error;
36891  (void)__Pyx_modinit_variable_import_code();
36892  (void)__Pyx_modinit_function_import_code();
36893  /*--- Execution code ---*/
36894  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
36895  if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error)
36896  #endif
36897 
36898  /* "cmeshTools.pyx":4
36899  * import cython
36900  * cimport cython
36901  * import numpy as np # <<<<<<<<<<<<<<
36902  * cimport numpy as np
36903  * from libcpp cimport bool
36904  */
36905  __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
36906  __Pyx_GOTREF(__pyx_t_1);
36907  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(1, 4, __pyx_L1_error)
36908  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36909 
36910  /* "cmeshTools.pyx":7
36911  * cimport numpy as np
36912  * from libcpp cimport bool
36913  * from mpi4py import MPI # <<<<<<<<<<<<<<
36914  * cimport mesh as cppm
36915  * from proteus import Comm
36916  */
36917  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
36918  __Pyx_GOTREF(__pyx_t_1);
36919  __Pyx_INCREF(__pyx_n_s_MPI);
36920  __Pyx_GIVEREF(__pyx_n_s_MPI);
36921  PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_MPI);
36922  __pyx_t_2 = __Pyx_Import(__pyx_n_s_mpi4py, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 7, __pyx_L1_error)
36923  __Pyx_GOTREF(__pyx_t_2);
36924  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36925  __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_MPI); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
36926  __Pyx_GOTREF(__pyx_t_1);
36927  if (PyDict_SetItem(__pyx_d, __pyx_n_s_MPI, __pyx_t_1) < 0) __PYX_ERR(1, 7, __pyx_L1_error)
36928  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36929  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36930 
36931  /* "cmeshTools.pyx":9
36932  * from mpi4py import MPI
36933  * cimport mesh as cppm
36934  * from proteus import Comm # <<<<<<<<<<<<<<
36935  *
36936  * cdef class CMesh:
36937  */
36938  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error)
36939  __Pyx_GOTREF(__pyx_t_2);
36940  __Pyx_INCREF(__pyx_n_s_Comm);
36941  __Pyx_GIVEREF(__pyx_n_s_Comm);
36942  PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Comm);
36943  __pyx_t_1 = __Pyx_Import(__pyx_n_s_proteus, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
36944  __Pyx_GOTREF(__pyx_t_1);
36945  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36946  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Comm); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 9, __pyx_L1_error)
36947  __Pyx_GOTREF(__pyx_t_2);
36948  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Comm, __pyx_t_2) < 0) __PYX_ERR(1, 9, __pyx_L1_error)
36949  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
36950  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36951 
36952  /* "cmeshTools.pyx":117
36953  * self.volume = self.mesh.volume
36954  *
36955  * def buildPythonMeshInterface(cmesh): # <<<<<<<<<<<<<<
36956  * """
36957  * function to be conform to old module, and to calls from MeshTools
36958  */
36959  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cmeshTools_1buildPythonMeshInterface, NULL, __pyx_n_s_cmeshTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 117, __pyx_L1_error)
36960  __Pyx_GOTREF(__pyx_t_1);
36961  if (PyDict_SetItem(__pyx_d, __pyx_n_s_buildPythonMeshInterface, __pyx_t_1) < 0) __PYX_ERR(1, 117, __pyx_L1_error)
36962  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36963 
36964  /* "cmeshTools.pyx":173
36965  * cmesh.volume)
36966  *
36967  * def buildPythonMeshInterfaceNoArrays(cmesh): # <<<<<<<<<<<<<<
36968  * """
36969  * function to be conform to old module, and to calls from MeshTools
36970  */
36971  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cmeshTools_3buildPythonMeshInterfaceNoArrays, NULL, __pyx_n_s_cmeshTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 173, __pyx_L1_error)
36972  __Pyx_GOTREF(__pyx_t_1);
36973  if (PyDict_SetItem(__pyx_d, __pyx_n_s_buildPythonMeshInterfaceNoArrays, __pyx_t_1) < 0) __PYX_ERR(1, 173, __pyx_L1_error)
36974  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36975 
36976  /* "cmeshTools.pyx":297
36977  * self.elementChildrenOffsetsList += [np.asarray(<int[:dim]> self.multilevelMesh.elementChildrenOffsets[n-1])]
36978  *
36979  * def buildPythonMultilevelMeshInterface(cmultilevelMesh): # <<<<<<<<<<<<<<
36980  * cmultilevelMesh.buildPythonMultilevelMeshInterface()
36981  * return (cmultilevelMesh.nLevels,
36982  */
36983  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cmeshTools_5buildPythonMultilevelMeshInterface, NULL, __pyx_n_s_cmeshTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 297, __pyx_L1_error)
36984  __Pyx_GOTREF(__pyx_t_1);
36985  if (PyDict_SetItem(__pyx_d, __pyx_n_s_buildPythonMultilevelMeshInterfa, __pyx_t_1) < 0) __PYX_ERR(1, 297, __pyx_L1_error)
36986  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36987 
36988  /* "cmeshTools.pyx":491
36989  * cppm.allocateGeometricInfo_NURBS(cmesh.mesh);
36990  *
36991  * def locallyRefineMultilevelMesh(int nSpace, # <<<<<<<<<<<<<<
36992  * CMultilevelMesh cmultilevelMesh,
36993  * np.ndarray elementTagArray,
36994  */
36995  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cmeshTools_67locallyRefineMultilevelMesh, NULL, __pyx_n_s_cmeshTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 491, __pyx_L1_error)
36996  __Pyx_GOTREF(__pyx_t_1);
36997  if (PyDict_SetItem(__pyx_d, __pyx_n_s_locallyRefineMultilevelMesh, __pyx_t_1) < 0) __PYX_ERR(1, 491, __pyx_L1_error)
36998  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
36999 
37000  /* "cmeshTools.pyx":529
37001  * print("locallyRefine nSpace= {0:d} not implemented! Returning.".format(nSpace))
37002  *
37003  * def setNewestNodeBases(int nSpace, CMultilevelMesh cmultilevelMesh): # <<<<<<<<<<<<<<
37004  * if nSpace == 2:
37005  * failed = cppm.setNewestNodeBasesToLongestEdge(cmultilevelMesh.multilevelMesh)
37006  */
37007  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10cmeshTools_69setNewestNodeBases, NULL, __pyx_n_s_cmeshTools); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 529, __pyx_L1_error)
37008  __Pyx_GOTREF(__pyx_t_1);
37009  if (PyDict_SetItem(__pyx_d, __pyx_n_s_setNewestNodeBases, __pyx_t_1) < 0) __PYX_ERR(1, 529, __pyx_L1_error)
37010  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37011 
37012  /* "cmeshTools.pyx":1
37013  * # A type of -*- python -*- file # <<<<<<<<<<<<<<
37014  * import cython
37015  * cimport cython
37016  */
37017  __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error)
37018  __Pyx_GOTREF(__pyx_t_1);
37019  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
37020  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37021 
37022  /* "View.MemoryView":209
37023  * info.obj = self
37024  *
37025  * __pyx_getbuffer = capsule(<void *> &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
37026  *
37027  * def __dealloc__(array self):
37028  */
37029  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_array_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
37030  __Pyx_GOTREF(__pyx_t_1);
37031  if (PyDict_SetItem((PyObject *)__pyx_array_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 209, __pyx_L1_error)
37032  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37033  PyType_Modified(__pyx_array_type);
37034 
37035  /* "View.MemoryView":286
37036  * return self.name
37037  *
37038  * cdef generic = Enum("<strided and direct or indirect>") # <<<<<<<<<<<<<<
37039  * cdef strided = Enum("<strided and direct>") # default
37040  * cdef indirect = Enum("<strided and indirect>")
37041  */
37042  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L1_error)
37043  __Pyx_GOTREF(__pyx_t_1);
37044  __Pyx_XGOTREF(generic);
37045  __Pyx_DECREF_SET(generic, __pyx_t_1);
37046  __Pyx_GIVEREF(__pyx_t_1);
37047  __pyx_t_1 = 0;
37048 
37049  /* "View.MemoryView":287
37050  *
37051  * cdef generic = Enum("<strided and direct or indirect>")
37052  * cdef strided = Enum("<strided and direct>") # default # <<<<<<<<<<<<<<
37053  * cdef indirect = Enum("<strided and indirect>")
37054  *
37055  */
37056  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error)
37057  __Pyx_GOTREF(__pyx_t_1);
37058  __Pyx_XGOTREF(strided);
37059  __Pyx_DECREF_SET(strided, __pyx_t_1);
37060  __Pyx_GIVEREF(__pyx_t_1);
37061  __pyx_t_1 = 0;
37062 
37063  /* "View.MemoryView":288
37064  * cdef generic = Enum("<strided and direct or indirect>")
37065  * cdef strided = Enum("<strided and direct>") # default
37066  * cdef indirect = Enum("<strided and indirect>") # <<<<<<<<<<<<<<
37067  *
37068  *
37069  */
37070  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error)
37071  __Pyx_GOTREF(__pyx_t_1);
37072  __Pyx_XGOTREF(indirect);
37073  __Pyx_DECREF_SET(indirect, __pyx_t_1);
37074  __Pyx_GIVEREF(__pyx_t_1);
37075  __pyx_t_1 = 0;
37076 
37077  /* "View.MemoryView":291
37078  *
37079  *
37080  * cdef contiguous = Enum("<contiguous and direct>") # <<<<<<<<<<<<<<
37081  * cdef indirect_contiguous = Enum("<contiguous and indirect>")
37082  *
37083  */
37084  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
37085  __Pyx_GOTREF(__pyx_t_1);
37086  __Pyx_XGOTREF(contiguous);
37087  __Pyx_DECREF_SET(contiguous, __pyx_t_1);
37088  __Pyx_GIVEREF(__pyx_t_1);
37089  __pyx_t_1 = 0;
37090 
37091  /* "View.MemoryView":292
37092  *
37093  * cdef contiguous = Enum("<contiguous and direct>")
37094  * cdef indirect_contiguous = Enum("<contiguous and indirect>") # <<<<<<<<<<<<<<
37095  *
37096  *
37097  */
37098  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_MemviewEnum_type), __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error)
37099  __Pyx_GOTREF(__pyx_t_1);
37100  __Pyx_XGOTREF(indirect_contiguous);
37101  __Pyx_DECREF_SET(indirect_contiguous, __pyx_t_1);
37102  __Pyx_GIVEREF(__pyx_t_1);
37103  __pyx_t_1 = 0;
37104 
37105  /* "View.MemoryView":316
37106  *
37107  * DEF THREAD_LOCKS_PREALLOCATED = 8
37108  * cdef int __pyx_memoryview_thread_locks_used = 0 # <<<<<<<<<<<<<<
37109  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [
37110  * PyThread_allocate_lock(),
37111  */
37112  __pyx_memoryview_thread_locks_used = 0;
37113 
37114  /* "View.MemoryView":317
37115  * DEF THREAD_LOCKS_PREALLOCATED = 8
37116  * cdef int __pyx_memoryview_thread_locks_used = 0
37117  * cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [ # <<<<<<<<<<<<<<
37118  * PyThread_allocate_lock(),
37119  * PyThread_allocate_lock(),
37120  */
37121  __pyx_t_3[0] = PyThread_allocate_lock();
37122  __pyx_t_3[1] = PyThread_allocate_lock();
37123  __pyx_t_3[2] = PyThread_allocate_lock();
37124  __pyx_t_3[3] = PyThread_allocate_lock();
37125  __pyx_t_3[4] = PyThread_allocate_lock();
37126  __pyx_t_3[5] = PyThread_allocate_lock();
37127  __pyx_t_3[6] = PyThread_allocate_lock();
37128  __pyx_t_3[7] = PyThread_allocate_lock();
37129  memcpy(&(__pyx_memoryview_thread_locks[0]), __pyx_t_3, sizeof(__pyx_memoryview_thread_locks[0]) * (8));
37130 
37131  /* "View.MemoryView":545
37132  * info.obj = self
37133  *
37134  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
37135  *
37136  *
37137  */
37138  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
37139  __Pyx_GOTREF(__pyx_t_1);
37140  if (PyDict_SetItem((PyObject *)__pyx_memoryview_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 545, __pyx_L1_error)
37141  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37142  PyType_Modified(__pyx_memoryview_type);
37143 
37144  /* "View.MemoryView":991
37145  * return self.from_object
37146  *
37147  * __pyx_getbuffer = capsule(<void *> &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") # <<<<<<<<<<<<<<
37148  *
37149  *
37150  */
37151  __pyx_t_1 = __pyx_capsule_create(((void *)(&__pyx_memoryview_getbuffer)), ((char *)"getbuffer(obj, view, flags)")); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 991, __pyx_L1_error)
37152  __Pyx_GOTREF(__pyx_t_1);
37153  if (PyDict_SetItem((PyObject *)__pyx_memoryviewslice_type->tp_dict, __pyx_n_s_pyx_getbuffer, __pyx_t_1) < 0) __PYX_ERR(0, 991, __pyx_L1_error)
37154  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37155  PyType_Modified(__pyx_memoryviewslice_type);
37156 
37157  /* "(tree fragment)":1
37158  * def __pyx_unpickle_Enum(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
37159  * cdef object __pyx_PickleError
37160  * cdef object __pyx_result
37161  */
37162  __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_15View_dot_MemoryView_1__pyx_unpickle_Enum, NULL, __pyx_n_s_View_MemoryView); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
37163  __Pyx_GOTREF(__pyx_t_1);
37164  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Enum, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
37165  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
37166 
37167  /* "BufferFormatFromTypeInfo":1460
37168  *
37169  * @cname('__pyx_format_from_typeinfo')
37170  * cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): # <<<<<<<<<<<<<<
37171  * cdef __Pyx_StructField *field
37172  * cdef __pyx_typeinfo_string fmt
37173  */
37174 
37175  /*--- Wrapped vars code ---*/
37176 
37177  goto __pyx_L0;
37178  __pyx_L1_error:;
37179  __Pyx_XDECREF(__pyx_t_1);
37180  __Pyx_XDECREF(__pyx_t_2);
37181  if (__pyx_m) {
37182  if (__pyx_d) {
37183  __Pyx_AddTraceback("init cmeshTools", __pyx_clineno, __pyx_lineno, __pyx_filename);
37184  }
37185  Py_CLEAR(__pyx_m);
37186  } else if (!PyErr_Occurred()) {
37187  PyErr_SetString(PyExc_ImportError, "init cmeshTools");
37188  }
37189  __pyx_L0:;
37190  __Pyx_RefNannyFinishContext();
37191  #if CYTHON_PEP489_MULTI_PHASE_INIT
37192  return (__pyx_m != NULL) ? 0 : -1;
37193  #elif PY_MAJOR_VERSION >= 3
37194  return __pyx_m;
37195  #else
37196  return;
37197  #endif
37198 }
37199 
37200 /* --- Runtime support code --- */
37201 /* Refnanny */
37202 #if CYTHON_REFNANNY
37203 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
37204  PyObject *m = NULL, *p = NULL;
37205  void *r = NULL;
37206  m = PyImport_ImportModule(modname);
37207  if (!m) goto end;
37208  p = PyObject_GetAttrString(m, "RefNannyAPI");
37209  if (!p) goto end;
37210  r = PyLong_AsVoidPtr(p);
37211 end:
37212  Py_XDECREF(p);
37213  Py_XDECREF(m);
37214  return (__Pyx_RefNannyAPIStruct *)r;
37215 }
37216 #endif
37217 
37218 /* PyObjectGetAttrStr */
37219 #if CYTHON_USE_TYPE_SLOTS
37220 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
37221  PyTypeObject* tp = Py_TYPE(obj);
37222  if (likely(tp->tp_getattro))
37223  return tp->tp_getattro(obj, attr_name);
37224 #if PY_MAJOR_VERSION < 3
37225  if (likely(tp->tp_getattr))
37226  return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
37227 #endif
37228  return PyObject_GetAttr(obj, attr_name);
37229 }
37230 #endif
37231 
37232 /* GetBuiltinName */
37233 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
37234  PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
37235  if (unlikely(!result)) {
37236  PyErr_Format(PyExc_NameError,
37237 #if PY_MAJOR_VERSION >= 3
37238  "name '%U' is not defined", name);
37239 #else
37240  "name '%.200s' is not defined", PyString_AS_STRING(name));
37241 #endif
37242  }
37243  return result;
37244 }
37245 
37246 /* RaiseArgTupleInvalid */
37247 static void __Pyx_RaiseArgtupleInvalid(
37248  const char* func_name,
37249  int exact,
37250  Py_ssize_t num_min,
37251  Py_ssize_t num_max,
37252  Py_ssize_t num_found)
37253 {
37254  Py_ssize_t num_expected;
37255  const char *more_or_less;
37256  if (num_found < num_min) {
37257  num_expected = num_min;
37258  more_or_less = "at least";
37259  } else {
37260  num_expected = num_max;
37261  more_or_less = "at most";
37262  }
37263  if (exact) {
37264  more_or_less = "exactly";
37265  }
37266  PyErr_Format(PyExc_TypeError,
37267  "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
37268  func_name, more_or_less, num_expected,
37269  (num_expected == 1) ? "" : "s", num_found);
37270 }
37271 
37272 /* KeywordStringCheck */
37273 static int __Pyx_CheckKeywordStrings(
37274  PyObject *kwdict,
37275  const char* function_name,
37276  int kw_allowed)
37277 {
37278  PyObject* key = 0;
37279  Py_ssize_t pos = 0;
37280 #if CYTHON_COMPILING_IN_PYPY
37281  if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
37282  goto invalid_keyword;
37283  return 1;
37284 #else
37285  while (PyDict_Next(kwdict, &pos, &key, 0)) {
37286  #if PY_MAJOR_VERSION < 3
37287  if (unlikely(!PyString_Check(key)))
37288  #endif
37289  if (unlikely(!PyUnicode_Check(key)))
37290  goto invalid_keyword_type;
37291  }
37292  if ((!kw_allowed) && unlikely(key))
37293  goto invalid_keyword;
37294  return 1;
37295 invalid_keyword_type:
37296  PyErr_Format(PyExc_TypeError,
37297  "%.200s() keywords must be strings", function_name);
37298  return 0;
37299 #endif
37300 invalid_keyword:
37301  PyErr_Format(PyExc_TypeError,
37302  #if PY_MAJOR_VERSION < 3
37303  "%.200s() got an unexpected keyword argument '%.200s'",
37304  function_name, PyString_AsString(key));
37305  #else
37306  "%s() got an unexpected keyword argument '%U'",
37307  function_name, key);
37308  #endif
37309  return 0;
37310 }
37311 
37312 /* GetModuleGlobalName */
37313 #if CYTHON_USE_DICT_VERSIONS
37314 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
37315 #else
37316 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
37317 #endif
37318 {
37319  PyObject *result;
37320 #if !CYTHON_AVOID_BORROWED_REFS
37321 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1
37322  result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
37323  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
37324  if (likely(result)) {
37325  return __Pyx_NewRef(result);
37326  } else if (unlikely(PyErr_Occurred())) {
37327  return NULL;
37328  }
37329 #else
37330  result = PyDict_GetItem(__pyx_d, name);
37331  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
37332  if (likely(result)) {
37333  return __Pyx_NewRef(result);
37334  }
37335 #endif
37336 #else
37337  result = PyObject_GetItem(__pyx_d, name);
37338  __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
37339  if (likely(result)) {
37340  return __Pyx_NewRef(result);
37341  }
37342  PyErr_Clear();
37343 #endif
37344  return __Pyx_GetBuiltinName(name);
37345 }
37346 
37347 /* PyCFunctionFastCall */
37348 #if CYTHON_FAST_PYCCALL
37349 static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
37350  PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
37351  PyCFunction meth = PyCFunction_GET_FUNCTION(func);
37352  PyObject *self = PyCFunction_GET_SELF(func);
37353  int flags = PyCFunction_GET_FLAGS(func);
37354  assert(PyCFunction_Check(func));
37355  assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS)));
37356  assert(nargs >= 0);
37357  assert(nargs == 0 || args != NULL);
37358  /* _PyCFunction_FastCallDict() must not be called with an exception set,
37359  because it may clear it (directly or indirectly) and so the
37360  caller loses its exception */
37361  assert(!PyErr_Occurred());
37362  if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
37363  return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL);
37364  } else {
37365  return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs);
37366  }
37367 }
37368 #endif
37369 
37370 /* PyFunctionFastCall */
37371 #if CYTHON_FAST_PYCALL
37372 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
37373  PyObject *globals) {
37374  PyFrameObject *f;
37375  PyThreadState *tstate = __Pyx_PyThreadState_Current;
37376  PyObject **fastlocals;
37377  Py_ssize_t i;
37378  PyObject *result;
37379  assert(globals != NULL);
37380  /* XXX Perhaps we should create a specialized
37381  PyFrame_New() that doesn't take locals, but does
37382  take builtins without sanity checking them.
37383  */
37384  assert(tstate != NULL);
37385  f = PyFrame_New(tstate, co, globals, NULL);
37386  if (f == NULL) {
37387  return NULL;
37388  }
37389  fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
37390  for (i = 0; i < na; i++) {
37391  Py_INCREF(*args);
37392  fastlocals[i] = *args++;
37393  }
37394  result = PyEval_EvalFrameEx(f,0);
37395  ++tstate->recursion_depth;
37396  Py_DECREF(f);
37397  --tstate->recursion_depth;
37398  return result;
37399 }
37400 #if 1 || PY_VERSION_HEX < 0x030600B1
37401 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
37402  PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
37403  PyObject *globals = PyFunction_GET_GLOBALS(func);
37404  PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
37405  PyObject *closure;
37406 #if PY_MAJOR_VERSION >= 3
37407  PyObject *kwdefs;
37408 #endif
37409  PyObject *kwtuple, **k;
37410  PyObject **d;
37411  Py_ssize_t nd;
37412  Py_ssize_t nk;
37413  PyObject *result;
37414  assert(kwargs == NULL || PyDict_Check(kwargs));
37415  nk = kwargs ? PyDict_Size(kwargs) : 0;
37416  if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
37417  return NULL;
37418  }
37419  if (
37420 #if PY_MAJOR_VERSION >= 3
37421  co->co_kwonlyargcount == 0 &&
37422 #endif
37423  likely(kwargs == NULL || nk == 0) &&
37424  co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
37425  if (argdefs == NULL && co->co_argcount == nargs) {
37426  result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
37427  goto done;
37428  }
37429  else if (nargs == 0 && argdefs != NULL
37430  && co->co_argcount == Py_SIZE(argdefs)) {
37431  /* function called with no arguments, but all parameters have
37432  a default value: use default values as arguments .*/
37433  args = &PyTuple_GET_ITEM(argdefs, 0);
37434  result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
37435  goto done;
37436  }
37437  }
37438  if (kwargs != NULL) {
37439  Py_ssize_t pos, i;
37440  kwtuple = PyTuple_New(2 * nk);
37441  if (kwtuple == NULL) {
37442  result = NULL;
37443  goto done;
37444  }
37445  k = &PyTuple_GET_ITEM(kwtuple, 0);
37446  pos = i = 0;
37447  while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
37448  Py_INCREF(k[i]);
37449  Py_INCREF(k[i+1]);
37450  i += 2;
37451  }
37452  nk = i / 2;
37453  }
37454  else {
37455  kwtuple = NULL;
37456  k = NULL;
37457  }
37458  closure = PyFunction_GET_CLOSURE(func);
37459 #if PY_MAJOR_VERSION >= 3
37460  kwdefs = PyFunction_GET_KW_DEFAULTS(func);
37461 #endif
37462  if (argdefs != NULL) {
37463  d = &PyTuple_GET_ITEM(argdefs, 0);
37464  nd = Py_SIZE(argdefs);
37465  }
37466  else {
37467  d = NULL;
37468  nd = 0;
37469  }
37470 #if PY_MAJOR_VERSION >= 3
37471  result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
37472  args, nargs,
37473  k, (int)nk,
37474  d, (int)nd, kwdefs, closure);
37475 #else
37476  result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
37477  args, nargs,
37478  k, (int)nk,
37479  d, (int)nd, closure);
37480 #endif
37481  Py_XDECREF(kwtuple);
37482 done:
37483  Py_LeaveRecursiveCall();
37484  return result;
37485 }
37486 #endif
37487 #endif
37488 
37489 /* PyObjectCall */
37490 #if CYTHON_COMPILING_IN_CPYTHON
37491 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
37492  PyObject *result;
37493  ternaryfunc call = func->ob_type->tp_call;
37494  if (unlikely(!call))
37495  return PyObject_Call(func, arg, kw);
37496  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
37497  return NULL;
37498  result = (*call)(func, arg, kw);
37499  Py_LeaveRecursiveCall();
37500  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
37501  PyErr_SetString(
37502  PyExc_SystemError,
37503  "NULL result without error in PyObject_Call");
37504  }
37505  return result;
37506 }
37507 #endif
37508 
37509 /* PyObjectCall2Args */
37510 static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
37511  PyObject *args, *result = NULL;
37512  #if CYTHON_FAST_PYCALL
37513  if (PyFunction_Check(function)) {
37514  PyObject *args[2] = {arg1, arg2};
37515  return __Pyx_PyFunction_FastCall(function, args, 2);
37516  }
37517  #endif
37518  #if CYTHON_FAST_PYCCALL
37519  if (__Pyx_PyFastCFunction_Check(function)) {
37520  PyObject *args[2] = {arg1, arg2};
37521  return __Pyx_PyCFunction_FastCall(function, args, 2);
37522  }
37523  #endif
37524  args = PyTuple_New(2);
37525  if (unlikely(!args)) goto done;
37526  Py_INCREF(arg1);
37527  PyTuple_SET_ITEM(args, 0, arg1);
37528  Py_INCREF(arg2);
37529  PyTuple_SET_ITEM(args, 1, arg2);
37530  Py_INCREF(function);
37531  result = __Pyx_PyObject_Call(function, args, NULL);
37532  Py_DECREF(args);
37533  Py_DECREF(function);
37534 done:
37535  return result;
37536 }
37537 
37538 /* PyObjectCallMethO */
37539 #if CYTHON_COMPILING_IN_CPYTHON
37540 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
37541  PyObject *self, *result;
37542  PyCFunction cfunc;
37543  cfunc = PyCFunction_GET_FUNCTION(func);
37544  self = PyCFunction_GET_SELF(func);
37545  if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
37546  return NULL;
37547  result = cfunc(self, arg);
37548  Py_LeaveRecursiveCall();
37549  if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
37550  PyErr_SetString(
37551  PyExc_SystemError,
37552  "NULL result without error in PyObject_Call");
37553  }
37554  return result;
37555 }
37556 #endif
37557 
37558 /* PyObjectCallOneArg */
37559 #if CYTHON_COMPILING_IN_CPYTHON
37560 static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
37561  PyObject *result;
37562  PyObject *args = PyTuple_New(1);
37563  if (unlikely(!args)) return NULL;
37564  Py_INCREF(arg);
37565  PyTuple_SET_ITEM(args, 0, arg);
37566  result = __Pyx_PyObject_Call(func, args, NULL);
37567  Py_DECREF(args);
37568  return result;
37569 }
37570 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
37571 #if CYTHON_FAST_PYCALL
37572  if (PyFunction_Check(func)) {
37573  return __Pyx_PyFunction_FastCall(func, &arg, 1);
37574  }
37575 #endif
37576  if (likely(PyCFunction_Check(func))) {
37577  if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
37578  return __Pyx_PyObject_CallMethO(func, arg);
37579 #if CYTHON_FAST_PYCCALL
37580  } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
37581  return __Pyx_PyCFunction_FastCall(func, &arg, 1);
37582 #endif
37583  }
37584  }
37585  return __Pyx__PyObject_CallOneArg(func, arg);
37586 }
37587 #else
37588 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
37589  PyObject *result;
37590  PyObject *args = PyTuple_Pack(1, arg);
37591  if (unlikely(!args)) return NULL;
37592  result = __Pyx_PyObject_Call(func, args, NULL);
37593  Py_DECREF(args);
37594  return result;
37595 }
37596 #endif
37597 
37598 /* ExtTypeTest */
37599 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
37600  if (unlikely(!type)) {
37601  PyErr_SetString(PyExc_SystemError, "Missing type object");
37602  return 0;
37603  }
37604  if (likely(__Pyx_TypeCheck(obj, type)))
37605  return 1;
37606  PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
37607  Py_TYPE(obj)->tp_name, type->tp_name);
37608  return 0;
37609 }
37610 
37611 /* PyErrFetchRestore */
37612 #if CYTHON_FAST_THREAD_STATE
37613 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
37614  PyObject *tmp_type, *tmp_value, *tmp_tb;
37615  tmp_type = tstate->curexc_type;
37616  tmp_value = tstate->curexc_value;
37617  tmp_tb = tstate->curexc_traceback;
37618  tstate->curexc_type = type;
37619  tstate->curexc_value = value;
37620  tstate->curexc_traceback = tb;
37621  Py_XDECREF(tmp_type);
37622  Py_XDECREF(tmp_value);
37623  Py_XDECREF(tmp_tb);
37624 }
37625 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
37626  *type = tstate->curexc_type;
37627  *value = tstate->curexc_value;
37628  *tb = tstate->curexc_traceback;
37629  tstate->curexc_type = 0;
37630  tstate->curexc_value = 0;
37631  tstate->curexc_traceback = 0;
37632 }
37633 #endif
37634 
37635 /* RaiseException */
37636 #if PY_MAJOR_VERSION < 3
37637 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
37638  CYTHON_UNUSED PyObject *cause) {
37639  __Pyx_PyThreadState_declare
37640  Py_XINCREF(type);
37641  if (!value || value == Py_None)
37642  value = NULL;
37643  else
37644  Py_INCREF(value);
37645  if (!tb || tb == Py_None)
37646  tb = NULL;
37647  else {
37648  Py_INCREF(tb);
37649  if (!PyTraceBack_Check(tb)) {
37650  PyErr_SetString(PyExc_TypeError,
37651  "raise: arg 3 must be a traceback or None");
37652  goto raise_error;
37653  }
37654  }
37655  if (PyType_Check(type)) {
37656 #if CYTHON_COMPILING_IN_PYPY
37657  if (!value) {
37658  Py_INCREF(Py_None);
37659  value = Py_None;
37660  }
37661 #endif
37662  PyErr_NormalizeException(&type, &value, &tb);
37663  } else {
37664  if (value) {
37665  PyErr_SetString(PyExc_TypeError,
37666  "instance exception may not have a separate value");
37667  goto raise_error;
37668  }
37669  value = type;
37670  type = (PyObject*) Py_TYPE(type);
37671  Py_INCREF(type);
37672  if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
37673  PyErr_SetString(PyExc_TypeError,
37674  "raise: exception class must be a subclass of BaseException");
37675  goto raise_error;
37676  }
37677  }
37678  __Pyx_PyThreadState_assign
37679  __Pyx_ErrRestore(type, value, tb);
37680  return;
37681 raise_error:
37682  Py_XDECREF(value);
37683  Py_XDECREF(type);
37684  Py_XDECREF(tb);
37685  return;
37686 }
37687 #else
37688 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
37689  PyObject* owned_instance = NULL;
37690  if (tb == Py_None) {
37691  tb = 0;
37692  } else if (tb && !PyTraceBack_Check(tb)) {
37693  PyErr_SetString(PyExc_TypeError,
37694  "raise: arg 3 must be a traceback or None");
37695  goto bad;
37696  }
37697  if (value == Py_None)
37698  value = 0;
37699  if (PyExceptionInstance_Check(type)) {
37700  if (value) {
37701  PyErr_SetString(PyExc_TypeError,
37702  "instance exception may not have a separate value");
37703  goto bad;
37704  }
37705  value = type;
37706  type = (PyObject*) Py_TYPE(value);
37707  } else if (PyExceptionClass_Check(type)) {
37708  PyObject *instance_class = NULL;
37709  if (value && PyExceptionInstance_Check(value)) {
37710  instance_class = (PyObject*) Py_TYPE(value);
37711  if (instance_class != type) {
37712  int is_subclass = PyObject_IsSubclass(instance_class, type);
37713  if (!is_subclass) {
37714  instance_class = NULL;
37715  } else if (unlikely(is_subclass == -1)) {
37716  goto bad;
37717  } else {
37718  type = instance_class;
37719  }
37720  }
37721  }
37722  if (!instance_class) {
37723  PyObject *args;
37724  if (!value)
37725  args = PyTuple_New(0);
37726  else if (PyTuple_Check(value)) {
37727  Py_INCREF(value);
37728  args = value;
37729  } else
37730  args = PyTuple_Pack(1, value);
37731  if (!args)
37732  goto bad;
37733  owned_instance = PyObject_Call(type, args, NULL);
37734  Py_DECREF(args);
37735  if (!owned_instance)
37736  goto bad;
37737  value = owned_instance;
37738  if (!PyExceptionInstance_Check(value)) {
37739  PyErr_Format(PyExc_TypeError,
37740  "calling %R should have returned an instance of "
37741  "BaseException, not %R",
37742  type, Py_TYPE(value));
37743  goto bad;
37744  }
37745  }
37746  } else {
37747  PyErr_SetString(PyExc_TypeError,
37748  "raise: exception class must be a subclass of BaseException");
37749  goto bad;
37750  }
37751  if (cause) {
37752  PyObject *fixed_cause;
37753  if (cause == Py_None) {
37754  fixed_cause = NULL;
37755  } else if (PyExceptionClass_Check(cause)) {
37756  fixed_cause = PyObject_CallObject(cause, NULL);
37757  if (fixed_cause == NULL)
37758  goto bad;
37759  } else if (PyExceptionInstance_Check(cause)) {
37760  fixed_cause = cause;
37761  Py_INCREF(fixed_cause);
37762  } else {
37763  PyErr_SetString(PyExc_TypeError,
37764  "exception causes must derive from "
37765  "BaseException");
37766  goto bad;
37767  }
37768  PyException_SetCause(value, fixed_cause);
37769  }
37770  PyErr_SetObject(type, value);
37771  if (tb) {
37772 #if CYTHON_COMPILING_IN_PYPY
37773  PyObject *tmp_type, *tmp_value, *tmp_tb;
37774  PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
37775  Py_INCREF(tb);
37776  PyErr_Restore(tmp_type, tmp_value, tb);
37777  Py_XDECREF(tmp_tb);
37778 #else
37779  PyThreadState *tstate = __Pyx_PyThreadState_Current;
37780  PyObject* tmp_tb = tstate->curexc_traceback;
37781  if (tb != tmp_tb) {
37782  Py_INCREF(tb);
37783  tstate->curexc_traceback = tb;
37784  Py_XDECREF(tmp_tb);
37785  }
37786 #endif
37787  }
37788 bad:
37789  Py_XDECREF(owned_instance);
37790  return;
37791 }
37792 #endif
37793 
37794 /* PyObjectCallNoArg */
37795 #if CYTHON_COMPILING_IN_CPYTHON
37796 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
37797 #if CYTHON_FAST_PYCALL
37798  if (PyFunction_Check(func)) {
37799  return __Pyx_PyFunction_FastCall(func, NULL, 0);
37800  }
37801 #endif
37802 #ifdef __Pyx_CyFunction_USED
37803  if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func)))
37804 #else
37805  if (likely(PyCFunction_Check(func)))
37806 #endif
37807  {
37808  if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
37809  return __Pyx_PyObject_CallMethO(func, NULL);
37810  }
37811  }
37812  return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
37813 }
37814 #endif
37815 
37816 /* RaiseDoubleKeywords */
37817 static void __Pyx_RaiseDoubleKeywordsError(
37818  const char* func_name,
37819  PyObject* kw_name)
37820 {
37821  PyErr_Format(PyExc_TypeError,
37822  #if PY_MAJOR_VERSION >= 3
37823  "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
37824  #else
37825  "%s() got multiple values for keyword argument '%s'", func_name,
37826  PyString_AsString(kw_name));
37827  #endif
37828 }
37829 
37830 /* ParseKeywords */
37831 static int __Pyx_ParseOptionalKeywords(
37832  PyObject *kwds,
37833  PyObject **argnames[],
37834  PyObject *kwds2,
37835  PyObject *values[],
37836  Py_ssize_t num_pos_args,
37837  const char* function_name)
37838 {
37839  PyObject *key = 0, *value = 0;
37840  Py_ssize_t pos = 0;
37841  PyObject*** name;
37842  PyObject*** first_kw_arg = argnames + num_pos_args;
37843  while (PyDict_Next(kwds, &pos, &key, &value)) {
37844  name = first_kw_arg;
37845  while (*name && (**name != key)) name++;
37846  if (*name) {
37847  values[name-argnames] = value;
37848  continue;
37849  }
37850  name = first_kw_arg;
37851  #if PY_MAJOR_VERSION < 3
37852  if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
37853  while (*name) {
37854  if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
37855  && _PyString_Eq(**name, key)) {
37856  values[name-argnames] = value;
37857  break;
37858  }
37859  name++;
37860  }
37861  if (*name) continue;
37862  else {
37863  PyObject*** argname = argnames;
37864  while (argname != first_kw_arg) {
37865  if ((**argname == key) || (
37866  (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
37867  && _PyString_Eq(**argname, key))) {
37868  goto arg_passed_twice;
37869  }
37870  argname++;
37871  }
37872  }
37873  } else
37874  #endif
37875  if (likely(PyUnicode_Check(key))) {
37876  while (*name) {
37877  int cmp = (**name == key) ? 0 :
37878  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
37879  (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
37880  #endif
37881  PyUnicode_Compare(**name, key);
37882  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
37883  if (cmp == 0) {
37884  values[name-argnames] = value;
37885  break;
37886  }
37887  name++;
37888  }
37889  if (*name) continue;
37890  else {
37891  PyObject*** argname = argnames;
37892  while (argname != first_kw_arg) {
37893  int cmp = (**argname == key) ? 0 :
37894  #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
37895  (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
37896  #endif
37897  PyUnicode_Compare(**argname, key);
37898  if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
37899  if (cmp == 0) goto arg_passed_twice;
37900  argname++;
37901  }
37902  }
37903  } else
37904  goto invalid_keyword_type;
37905  if (kwds2) {
37906  if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
37907  } else {
37908  goto invalid_keyword;
37909  }
37910  }
37911  return 0;
37912 arg_passed_twice:
37913  __Pyx_RaiseDoubleKeywordsError(function_name, key);
37914  goto bad;
37915 invalid_keyword_type:
37916  PyErr_Format(PyExc_TypeError,
37917  "%.200s() keywords must be strings", function_name);
37918  goto bad;
37919 invalid_keyword:
37920  PyErr_Format(PyExc_TypeError,
37921  #if PY_MAJOR_VERSION < 3
37922  "%.200s() got an unexpected keyword argument '%.200s'",
37923  function_name, PyString_AsString(key));
37924  #else
37925  "%s() got an unexpected keyword argument '%U'",
37926  function_name, key);
37927  #endif
37928 bad:
37929  return -1;
37930 }
37931 
37932 /* ArgTypeTest */
37933 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
37934 {
37935  if (unlikely(!type)) {
37936  PyErr_SetString(PyExc_SystemError, "Missing type object");
37937  return 0;
37938  }
37939  else if (exact) {
37940  #if PY_MAJOR_VERSION == 2
37941  if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
37942  #endif
37943  }
37944  else {
37945  if (likely(__Pyx_TypeCheck(obj, type))) return 1;
37946  }
37947  PyErr_Format(PyExc_TypeError,
37948  "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
37949  name, type->tp_name, Py_TYPE(obj)->tp_name);
37950  return 0;
37951 }
37952 
37953 /* PyIntBinop */
37954 #if !CYTHON_COMPILING_IN_PYPY
37955 static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
37956  #if PY_MAJOR_VERSION < 3
37957  if (likely(PyInt_CheckExact(op1))) {
37958  const long b = intval;
37959  long x;
37960  long a = PyInt_AS_LONG(op1);
37961  x = (long)((unsigned long)a - b);
37962  if (likely((x^a) >= 0 || (x^~b) >= 0))
37963  return PyInt_FromLong(x);
37964  return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
37965  }
37966  #endif
37967  #if CYTHON_USE_PYLONG_INTERNALS
37968  if (likely(PyLong_CheckExact(op1))) {
37969  const long b = intval;
37970  long a, x;
37971 #ifdef HAVE_LONG_LONG
37972  const PY_LONG_LONG llb = intval;
37973  PY_LONG_LONG lla, llx;
37974 #endif
37975  const digit* digits = ((PyLongObject*)op1)->ob_digit;
37976  const Py_ssize_t size = Py_SIZE(op1);
37977  if (likely(__Pyx_sst_abs(size) <= 1)) {
37978  a = likely(size) ? digits[0] : 0;
37979  if (size == -1) a = -a;
37980  } else {
37981  switch (size) {
37982  case -2:
37983  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
37984  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37985  break;
37986 #ifdef HAVE_LONG_LONG
37987  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
37988  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
37989  goto long_long;
37990 #endif
37991  }
37992  CYTHON_FALLTHROUGH;
37993  case 2:
37994  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
37995  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
37996  break;
37997 #ifdef HAVE_LONG_LONG
37998  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
37999  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38000  goto long_long;
38001 #endif
38002  }
38003  CYTHON_FALLTHROUGH;
38004  case -3:
38005  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
38006  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38007  break;
38008 #ifdef HAVE_LONG_LONG
38009  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
38010  lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38011  goto long_long;
38012 #endif
38013  }
38014  CYTHON_FALLTHROUGH;
38015  case 3:
38016  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
38017  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38018  break;
38019 #ifdef HAVE_LONG_LONG
38020  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
38021  lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38022  goto long_long;
38023 #endif
38024  }
38025  CYTHON_FALLTHROUGH;
38026  case -4:
38027  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
38028  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38029  break;
38030 #ifdef HAVE_LONG_LONG
38031  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
38032  lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38033  goto long_long;
38034 #endif
38035  }
38036  CYTHON_FALLTHROUGH;
38037  case 4:
38038  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
38039  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38040  break;
38041 #ifdef HAVE_LONG_LONG
38042  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
38043  lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38044  goto long_long;
38045 #endif
38046  }
38047  CYTHON_FALLTHROUGH;
38048  default: return PyLong_Type.tp_as_number->nb_subtract(op1, op2);
38049  }
38050  }
38051  x = a - b;
38052  return PyLong_FromLong(x);
38053 #ifdef HAVE_LONG_LONG
38054  long_long:
38055  llx = lla - llb;
38056  return PyLong_FromLongLong(llx);
38057 #endif
38058 
38059 
38060  }
38061  #endif
38062  if (PyFloat_CheckExact(op1)) {
38063  const long b = intval;
38064  double a = PyFloat_AS_DOUBLE(op1);
38065  double result;
38066  PyFPE_START_PROTECT("subtract", return NULL)
38067  result = ((double)a) - (double)b;
38068  PyFPE_END_PROTECT(result)
38069  return PyFloat_FromDouble(result);
38070  }
38071  return (inplace ? PyNumber_InPlaceSubtract : PyNumber_Subtract)(op1, op2);
38072 }
38073 #endif
38074 
38075 /* PyIntCompare */
38076 static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) {
38077  if (op1 == op2) {
38078  Py_RETURN_TRUE;
38079  }
38080  #if PY_MAJOR_VERSION < 3
38081  if (likely(PyInt_CheckExact(op1))) {
38082  const long b = intval;
38083  long a = PyInt_AS_LONG(op1);
38084  if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
38085  }
38086  #endif
38087  #if CYTHON_USE_PYLONG_INTERNALS
38088  if (likely(PyLong_CheckExact(op1))) {
38089  int unequal;
38090  unsigned long uintval;
38091  Py_ssize_t size = Py_SIZE(op1);
38092  const digit* digits = ((PyLongObject*)op1)->ob_digit;
38093  if (intval == 0) {
38094  if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
38095  } else if (intval < 0) {
38096  if (size >= 0)
38097  Py_RETURN_FALSE;
38098  intval = -intval;
38099  size = -size;
38100  } else {
38101  if (size <= 0)
38102  Py_RETURN_FALSE;
38103  }
38104  uintval = (unsigned long) intval;
38105 #if PyLong_SHIFT * 4 < SIZEOF_LONG*8
38106  if (uintval >> (PyLong_SHIFT * 4)) {
38107  unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
38108  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
38109  } else
38110 #endif
38111 #if PyLong_SHIFT * 3 < SIZEOF_LONG*8
38112  if (uintval >> (PyLong_SHIFT * 3)) {
38113  unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
38114  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
38115  } else
38116 #endif
38117 #if PyLong_SHIFT * 2 < SIZEOF_LONG*8
38118  if (uintval >> (PyLong_SHIFT * 2)) {
38119  unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
38120  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
38121  } else
38122 #endif
38123 #if PyLong_SHIFT * 1 < SIZEOF_LONG*8
38124  if (uintval >> (PyLong_SHIFT * 1)) {
38125  unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
38126  | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
38127  } else
38128 #endif
38129  unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
38130  if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE;
38131  }
38132  #endif
38133  if (PyFloat_CheckExact(op1)) {
38134  const long b = intval;
38135  double a = PyFloat_AS_DOUBLE(op1);
38136  if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE;
38137  }
38138  return (
38139  PyObject_RichCompare(op1, op2, Py_EQ));
38140 }
38141 
38142 /* WriteUnraisableException */
38143 static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
38144  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
38145  int full_traceback, CYTHON_UNUSED int nogil) {
38146  PyObject *old_exc, *old_val, *old_tb;
38147  PyObject *ctx;
38148  __Pyx_PyThreadState_declare
38149 #ifdef WITH_THREAD
38150  PyGILState_STATE state;
38151  if (nogil)
38152  state = PyGILState_Ensure();
38153 #ifdef _MSC_VER
38154  else state = (PyGILState_STATE)-1;
38155 #endif
38156 #endif
38157  __Pyx_PyThreadState_assign
38158  __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
38159  if (full_traceback) {
38160  Py_XINCREF(old_exc);
38161  Py_XINCREF(old_val);
38162  Py_XINCREF(old_tb);
38163  __Pyx_ErrRestore(old_exc, old_val, old_tb);
38164  PyErr_PrintEx(1);
38165  }
38166  #if PY_MAJOR_VERSION < 3
38167  ctx = PyString_FromString(name);
38168  #else
38169  ctx = PyUnicode_FromString(name);
38170  #endif
38171  __Pyx_ErrRestore(old_exc, old_val, old_tb);
38172  if (!ctx) {
38173  PyErr_WriteUnraisable(Py_None);
38174  } else {
38175  PyErr_WriteUnraisable(ctx);
38176  Py_DECREF(ctx);
38177  }
38178 #ifdef WITH_THREAD
38179  if (nogil)
38180  PyGILState_Release(state);
38181 #endif
38182 }
38183 
38184 /* DictGetItem */
38185 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
38186 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
38187  PyObject *value;
38188  value = PyDict_GetItemWithError(d, key);
38189  if (unlikely(!value)) {
38190  if (!PyErr_Occurred()) {
38191  if (unlikely(PyTuple_Check(key))) {
38192  PyObject* args = PyTuple_Pack(1, key);
38193  if (likely(args)) {
38194  PyErr_SetObject(PyExc_KeyError, args);
38195  Py_DECREF(args);
38196  }
38197  } else {
38198  PyErr_SetObject(PyExc_KeyError, key);
38199  }
38200  }
38201  return NULL;
38202  }
38203  Py_INCREF(value);
38204  return value;
38205 }
38206 #endif
38207 
38208 /* RaiseTooManyValuesToUnpack */
38209 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
38210  PyErr_Format(PyExc_ValueError,
38211  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
38212 }
38213 
38214 /* RaiseNeedMoreValuesToUnpack */
38215 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
38216  PyErr_Format(PyExc_ValueError,
38217  "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
38218  index, (index == 1) ? "" : "s");
38219 }
38220 
38221 /* RaiseNoneIterError */
38222 static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
38223  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
38224 }
38225 
38226 /* GetTopmostException */
38227 #if CYTHON_USE_EXC_INFO_STACK
38228 static _PyErr_StackItem *
38229 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
38230 {
38231  _PyErr_StackItem *exc_info = tstate->exc_info;
38232  while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
38233  exc_info->previous_item != NULL)
38234  {
38235  exc_info = exc_info->previous_item;
38236  }
38237  return exc_info;
38238 }
38239 #endif
38240 
38241 /* SaveResetException */
38242 #if CYTHON_FAST_THREAD_STATE
38243 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
38244  #if CYTHON_USE_EXC_INFO_STACK
38245  _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
38246  *type = exc_info->exc_type;
38247  *value = exc_info->exc_value;
38248  *tb = exc_info->exc_traceback;
38249  #else
38250  *type = tstate->exc_type;
38251  *value = tstate->exc_value;
38252  *tb = tstate->exc_traceback;
38253  #endif
38254  Py_XINCREF(*type);
38255  Py_XINCREF(*value);
38256  Py_XINCREF(*tb);
38257 }
38258 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
38259  PyObject *tmp_type, *tmp_value, *tmp_tb;
38260  #if CYTHON_USE_EXC_INFO_STACK
38261  _PyErr_StackItem *exc_info = tstate->exc_info;
38262  tmp_type = exc_info->exc_type;
38263  tmp_value = exc_info->exc_value;
38264  tmp_tb = exc_info->exc_traceback;
38265  exc_info->exc_type = type;
38266  exc_info->exc_value = value;
38267  exc_info->exc_traceback = tb;
38268  #else
38269  tmp_type = tstate->exc_type;
38270  tmp_value = tstate->exc_value;
38271  tmp_tb = tstate->exc_traceback;
38272  tstate->exc_type = type;
38273  tstate->exc_value = value;
38274  tstate->exc_traceback = tb;
38275  #endif
38276  Py_XDECREF(tmp_type);
38277  Py_XDECREF(tmp_value);
38278  Py_XDECREF(tmp_tb);
38279 }
38280 #endif
38281 
38282 /* PyErrExceptionMatches */
38283 #if CYTHON_FAST_THREAD_STATE
38284 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
38285  Py_ssize_t i, n;
38286  n = PyTuple_GET_SIZE(tuple);
38287 #if PY_MAJOR_VERSION >= 3
38288  for (i=0; i<n; i++) {
38289  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
38290  }
38291 #endif
38292  for (i=0; i<n; i++) {
38293  if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
38294  }
38295  return 0;
38296 }
38297 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
38298  PyObject *exc_type = tstate->curexc_type;
38299  if (exc_type == err) return 1;
38300  if (unlikely(!exc_type)) return 0;
38301  if (unlikely(PyTuple_Check(err)))
38302  return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
38303  return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
38304 }
38305 #endif
38306 
38307 /* GetException */
38308 #if CYTHON_FAST_THREAD_STATE
38309 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
38310 #else
38311 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
38312 #endif
38313 {
38314  PyObject *local_type, *local_value, *local_tb;
38315 #if CYTHON_FAST_THREAD_STATE
38316  PyObject *tmp_type, *tmp_value, *tmp_tb;
38317  local_type = tstate->curexc_type;
38318  local_value = tstate->curexc_value;
38319  local_tb = tstate->curexc_traceback;
38320  tstate->curexc_type = 0;
38321  tstate->curexc_value = 0;
38322  tstate->curexc_traceback = 0;
38323 #else
38324  PyErr_Fetch(&local_type, &local_value, &local_tb);
38325 #endif
38326  PyErr_NormalizeException(&local_type, &local_value, &local_tb);
38327 #if CYTHON_FAST_THREAD_STATE
38328  if (unlikely(tstate->curexc_type))
38329 #else
38330  if (unlikely(PyErr_Occurred()))
38331 #endif
38332  goto bad;
38333  #if PY_MAJOR_VERSION >= 3
38334  if (local_tb) {
38335  if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
38336  goto bad;
38337  }
38338  #endif
38339  Py_XINCREF(local_tb);
38340  Py_XINCREF(local_type);
38341  Py_XINCREF(local_value);
38342  *type = local_type;
38343  *value = local_value;
38344  *tb = local_tb;
38345 #if CYTHON_FAST_THREAD_STATE
38346  #if CYTHON_USE_EXC_INFO_STACK
38347  {
38348  _PyErr_StackItem *exc_info = tstate->exc_info;
38349  tmp_type = exc_info->exc_type;
38350  tmp_value = exc_info->exc_value;
38351  tmp_tb = exc_info->exc_traceback;
38352  exc_info->exc_type = local_type;
38353  exc_info->exc_value = local_value;
38354  exc_info->exc_traceback = local_tb;
38355  }
38356  #else
38357  tmp_type = tstate->exc_type;
38358  tmp_value = tstate->exc_value;
38359  tmp_tb = tstate->exc_traceback;
38360  tstate->exc_type = local_type;
38361  tstate->exc_value = local_value;
38362  tstate->exc_traceback = local_tb;
38363  #endif
38364  Py_XDECREF(tmp_type);
38365  Py_XDECREF(tmp_value);
38366  Py_XDECREF(tmp_tb);
38367 #else
38368  PyErr_SetExcInfo(local_type, local_value, local_tb);
38369 #endif
38370  return 0;
38371 bad:
38372  *type = 0;
38373  *value = 0;
38374  *tb = 0;
38375  Py_XDECREF(local_type);
38376  Py_XDECREF(local_value);
38377  Py_XDECREF(local_tb);
38378  return -1;
38379 }
38380 
38381 /* BytesEquals */
38382 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
38383 #if CYTHON_COMPILING_IN_PYPY
38384  return PyObject_RichCompareBool(s1, s2, equals);
38385 #else
38386  if (s1 == s2) {
38387  return (equals == Py_EQ);
38388  } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
38389  const char *ps1, *ps2;
38390  Py_ssize_t length = PyBytes_GET_SIZE(s1);
38391  if (length != PyBytes_GET_SIZE(s2))
38392  return (equals == Py_NE);
38393  ps1 = PyBytes_AS_STRING(s1);
38394  ps2 = PyBytes_AS_STRING(s2);
38395  if (ps1[0] != ps2[0]) {
38396  return (equals == Py_NE);
38397  } else if (length == 1) {
38398  return (equals == Py_EQ);
38399  } else {
38400  int result;
38401 #if CYTHON_USE_UNICODE_INTERNALS
38402  Py_hash_t hash1, hash2;
38403  hash1 = ((PyBytesObject*)s1)->ob_shash;
38404  hash2 = ((PyBytesObject*)s2)->ob_shash;
38405  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
38406  return (equals == Py_NE);
38407  }
38408 #endif
38409  result = memcmp(ps1, ps2, (size_t)length);
38410  return (equals == Py_EQ) ? (result == 0) : (result != 0);
38411  }
38412  } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
38413  return (equals == Py_NE);
38414  } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
38415  return (equals == Py_NE);
38416  } else {
38417  int result;
38418  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
38419  if (!py_result)
38420  return -1;
38421  result = __Pyx_PyObject_IsTrue(py_result);
38422  Py_DECREF(py_result);
38423  return result;
38424  }
38425 #endif
38426 }
38427 
38428 /* UnicodeEquals */
38429 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
38430 #if CYTHON_COMPILING_IN_PYPY
38431  return PyObject_RichCompareBool(s1, s2, equals);
38432 #else
38433 #if PY_MAJOR_VERSION < 3
38434  PyObject* owned_ref = NULL;
38435 #endif
38436  int s1_is_unicode, s2_is_unicode;
38437  if (s1 == s2) {
38438  goto return_eq;
38439  }
38440  s1_is_unicode = PyUnicode_CheckExact(s1);
38441  s2_is_unicode = PyUnicode_CheckExact(s2);
38442 #if PY_MAJOR_VERSION < 3
38443  if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
38444  owned_ref = PyUnicode_FromObject(s2);
38445  if (unlikely(!owned_ref))
38446  return -1;
38447  s2 = owned_ref;
38448  s2_is_unicode = 1;
38449  } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
38450  owned_ref = PyUnicode_FromObject(s1);
38451  if (unlikely(!owned_ref))
38452  return -1;
38453  s1 = owned_ref;
38454  s1_is_unicode = 1;
38455  } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
38456  return __Pyx_PyBytes_Equals(s1, s2, equals);
38457  }
38458 #endif
38459  if (s1_is_unicode & s2_is_unicode) {
38460  Py_ssize_t length;
38461  int kind;
38462  void *data1, *data2;
38463  if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
38464  return -1;
38465  length = __Pyx_PyUnicode_GET_LENGTH(s1);
38466  if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
38467  goto return_ne;
38468  }
38469 #if CYTHON_USE_UNICODE_INTERNALS
38470  {
38471  Py_hash_t hash1, hash2;
38472  #if CYTHON_PEP393_ENABLED
38473  hash1 = ((PyASCIIObject*)s1)->hash;
38474  hash2 = ((PyASCIIObject*)s2)->hash;
38475  #else
38476  hash1 = ((PyUnicodeObject*)s1)->hash;
38477  hash2 = ((PyUnicodeObject*)s2)->hash;
38478  #endif
38479  if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
38480  goto return_ne;
38481  }
38482  }
38483 #endif
38484  kind = __Pyx_PyUnicode_KIND(s1);
38485  if (kind != __Pyx_PyUnicode_KIND(s2)) {
38486  goto return_ne;
38487  }
38488  data1 = __Pyx_PyUnicode_DATA(s1);
38489  data2 = __Pyx_PyUnicode_DATA(s2);
38490  if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
38491  goto return_ne;
38492  } else if (length == 1) {
38493  goto return_eq;
38494  } else {
38495  int result = memcmp(data1, data2, (size_t)(length * kind));
38496  #if PY_MAJOR_VERSION < 3
38497  Py_XDECREF(owned_ref);
38498  #endif
38499  return (equals == Py_EQ) ? (result == 0) : (result != 0);
38500  }
38501  } else if ((s1 == Py_None) & s2_is_unicode) {
38502  goto return_ne;
38503  } else if ((s2 == Py_None) & s1_is_unicode) {
38504  goto return_ne;
38505  } else {
38506  int result;
38507  PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
38508  #if PY_MAJOR_VERSION < 3
38509  Py_XDECREF(owned_ref);
38510  #endif
38511  if (!py_result)
38512  return -1;
38513  result = __Pyx_PyObject_IsTrue(py_result);
38514  Py_DECREF(py_result);
38515  return result;
38516  }
38517 return_eq:
38518  #if PY_MAJOR_VERSION < 3
38519  Py_XDECREF(owned_ref);
38520  #endif
38521  return (equals == Py_EQ);
38522 return_ne:
38523  #if PY_MAJOR_VERSION < 3
38524  Py_XDECREF(owned_ref);
38525  #endif
38526  return (equals == Py_NE);
38527 #endif
38528 }
38529 
38530 /* None */
38531 static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) {
38532  Py_ssize_t q = a / b;
38533  Py_ssize_t r = a - q*b;
38534  q -= ((r != 0) & ((r ^ b) < 0));
38535  return q;
38536 }
38537 
38538 /* GetAttr */
38539 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
38540 #if CYTHON_USE_TYPE_SLOTS
38541 #if PY_MAJOR_VERSION >= 3
38542  if (likely(PyUnicode_Check(n)))
38543 #else
38544  if (likely(PyString_Check(n)))
38545 #endif
38546  return __Pyx_PyObject_GetAttrStr(o, n);
38547 #endif
38548  return PyObject_GetAttr(o, n);
38549 }
38550 
38551 /* GetItemInt */
38552 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
38553  PyObject *r;
38554  if (!j) return NULL;
38555  r = PyObject_GetItem(o, j);
38556  Py_DECREF(j);
38557  return r;
38558 }
38559 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
38560  CYTHON_NCP_UNUSED int wraparound,
38561  CYTHON_NCP_UNUSED int boundscheck) {
38562 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
38563  Py_ssize_t wrapped_i = i;
38564  if (wraparound & unlikely(i < 0)) {
38565  wrapped_i += PyList_GET_SIZE(o);
38566  }
38567  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
38568  PyObject *r = PyList_GET_ITEM(o, wrapped_i);
38569  Py_INCREF(r);
38570  return r;
38571  }
38572  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
38573 #else
38574  return PySequence_GetItem(o, i);
38575 #endif
38576 }
38577 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
38578  CYTHON_NCP_UNUSED int wraparound,
38579  CYTHON_NCP_UNUSED int boundscheck) {
38580 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
38581  Py_ssize_t wrapped_i = i;
38582  if (wraparound & unlikely(i < 0)) {
38583  wrapped_i += PyTuple_GET_SIZE(o);
38584  }
38585  if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
38586  PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
38587  Py_INCREF(r);
38588  return r;
38589  }
38590  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
38591 #else
38592  return PySequence_GetItem(o, i);
38593 #endif
38594 }
38595 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
38596  CYTHON_NCP_UNUSED int wraparound,
38597  CYTHON_NCP_UNUSED int boundscheck) {
38598 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
38599  if (is_list || PyList_CheckExact(o)) {
38600  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
38601  if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
38602  PyObject *r = PyList_GET_ITEM(o, n);
38603  Py_INCREF(r);
38604  return r;
38605  }
38606  }
38607  else if (PyTuple_CheckExact(o)) {
38608  Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
38609  if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
38610  PyObject *r = PyTuple_GET_ITEM(o, n);
38611  Py_INCREF(r);
38612  return r;
38613  }
38614  } else {
38615  PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
38616  if (likely(m && m->sq_item)) {
38617  if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
38618  Py_ssize_t l = m->sq_length(o);
38619  if (likely(l >= 0)) {
38620  i += l;
38621  } else {
38622  if (!PyErr_ExceptionMatches(PyExc_OverflowError))
38623  return NULL;
38624  PyErr_Clear();
38625  }
38626  }
38627  return m->sq_item(o, i);
38628  }
38629  }
38630 #else
38631  if (is_list || PySequence_Check(o)) {
38632  return PySequence_GetItem(o, i);
38633  }
38634 #endif
38635  return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
38636 }
38637 
38638 /* ObjectGetItem */
38639 #if CYTHON_USE_TYPE_SLOTS
38640 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) {
38641  PyObject *runerr;
38642  Py_ssize_t key_value;
38643  PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence;
38644  if (unlikely(!(m && m->sq_item))) {
38645  PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name);
38646  return NULL;
38647  }
38648  key_value = __Pyx_PyIndex_AsSsize_t(index);
38649  if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
38650  return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
38651  }
38652  if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
38653  PyErr_Clear();
38654  PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name);
38655  }
38656  return NULL;
38657 }
38658 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) {
38659  PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping;
38660  if (likely(m && m->mp_subscript)) {
38661  return m->mp_subscript(obj, key);
38662  }
38663  return __Pyx_PyObject_GetIndex(obj, key);
38664 }
38665 #endif
38666 
38667 /* decode_c_string */
38668 static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
38669  const char* cstring, Py_ssize_t start, Py_ssize_t stop,
38670  const char* encoding, const char* errors,
38671  PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) {
38672  Py_ssize_t length;
38673  if (unlikely((start < 0) | (stop < 0))) {
38674  size_t slen = strlen(cstring);
38675  if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) {
38676  PyErr_SetString(PyExc_OverflowError,
38677  "c-string too long to convert to Python");
38678  return NULL;
38679  }
38680  length = (Py_ssize_t) slen;
38681  if (start < 0) {
38682  start += length;
38683  if (start < 0)
38684  start = 0;
38685  }
38686  if (stop < 0)
38687  stop += length;
38688  }
38689  length = stop - start;
38690  if (unlikely(length <= 0))
38691  return PyUnicode_FromUnicode(NULL, 0);
38692  cstring += start;
38693  if (decode_func) {
38694  return decode_func(cstring, length, errors);
38695  } else {
38696  return PyUnicode_Decode(cstring, length, encoding, errors);
38697  }
38698 }
38699 
38700 /* GetAttr3 */
38701 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
38702  __Pyx_PyThreadState_declare
38703  __Pyx_PyThreadState_assign
38704  if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
38705  return NULL;
38706  __Pyx_PyErr_Clear();
38707  Py_INCREF(d);
38708  return d;
38709 }
38710 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
38711  PyObject *r = __Pyx_GetAttr(o, n);
38712  return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
38713 }
38714 
38715 /* SwapException */
38716 #if CYTHON_FAST_THREAD_STATE
38717 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
38718  PyObject *tmp_type, *tmp_value, *tmp_tb;
38719  #if CYTHON_USE_EXC_INFO_STACK
38720  _PyErr_StackItem *exc_info = tstate->exc_info;
38721  tmp_type = exc_info->exc_type;
38722  tmp_value = exc_info->exc_value;
38723  tmp_tb = exc_info->exc_traceback;
38724  exc_info->exc_type = *type;
38725  exc_info->exc_value = *value;
38726  exc_info->exc_traceback = *tb;
38727  #else
38728  tmp_type = tstate->exc_type;
38729  tmp_value = tstate->exc_value;
38730  tmp_tb = tstate->exc_traceback;
38731  tstate->exc_type = *type;
38732  tstate->exc_value = *value;
38733  tstate->exc_traceback = *tb;
38734  #endif
38735  *type = tmp_type;
38736  *value = tmp_value;
38737  *tb = tmp_tb;
38738 }
38739 #else
38740 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
38741  PyObject *tmp_type, *tmp_value, *tmp_tb;
38742  PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
38743  PyErr_SetExcInfo(*type, *value, *tb);
38744  *type = tmp_type;
38745  *value = tmp_value;
38746  *tb = tmp_tb;
38747 }
38748 #endif
38749 
38750 /* Import */
38751 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
38752  PyObject *empty_list = 0;
38753  PyObject *module = 0;
38754  PyObject *global_dict = 0;
38755  PyObject *empty_dict = 0;
38756  PyObject *list;
38757  #if PY_MAJOR_VERSION < 3
38758  PyObject *py_import;
38759  py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
38760  if (!py_import)
38761  goto bad;
38762  #endif
38763  if (from_list)
38764  list = from_list;
38765  else {
38766  empty_list = PyList_New(0);
38767  if (!empty_list)
38768  goto bad;
38769  list = empty_list;
38770  }
38771  global_dict = PyModule_GetDict(__pyx_m);
38772  if (!global_dict)
38773  goto bad;
38774  empty_dict = PyDict_New();
38775  if (!empty_dict)
38776  goto bad;
38777  {
38778  #if PY_MAJOR_VERSION >= 3
38779  if (level == -1) {
38780  if (strchr(__Pyx_MODULE_NAME, '.')) {
38781  module = PyImport_ImportModuleLevelObject(
38782  name, global_dict, empty_dict, list, 1);
38783  if (!module) {
38784  if (!PyErr_ExceptionMatches(PyExc_ImportError))
38785  goto bad;
38786  PyErr_Clear();
38787  }
38788  }
38789  level = 0;
38790  }
38791  #endif
38792  if (!module) {
38793  #if PY_MAJOR_VERSION < 3
38794  PyObject *py_level = PyInt_FromLong(level);
38795  if (!py_level)
38796  goto bad;
38797  module = PyObject_CallFunctionObjArgs(py_import,
38798  name, global_dict, empty_dict, list, py_level, (PyObject *)NULL);
38799  Py_DECREF(py_level);
38800  #else
38801  module = PyImport_ImportModuleLevelObject(
38802  name, global_dict, empty_dict, list, level);
38803  #endif
38804  }
38805  }
38806 bad:
38807  #if PY_MAJOR_VERSION < 3
38808  Py_XDECREF(py_import);
38809  #endif
38810  Py_XDECREF(empty_list);
38811  Py_XDECREF(empty_dict);
38812  return module;
38813 }
38814 
38815 /* FastTypeChecks */
38816 #if CYTHON_COMPILING_IN_CPYTHON
38817 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
38818  while (a) {
38819  a = a->tp_base;
38820  if (a == b)
38821  return 1;
38822  }
38823  return b == &PyBaseObject_Type;
38824 }
38825 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
38826  PyObject *mro;
38827  if (a == b) return 1;
38828  mro = a->tp_mro;
38829  if (likely(mro)) {
38830  Py_ssize_t i, n;
38831  n = PyTuple_GET_SIZE(mro);
38832  for (i = 0; i < n; i++) {
38833  if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
38834  return 1;
38835  }
38836  return 0;
38837  }
38838  return __Pyx_InBases(a, b);
38839 }
38840 #if PY_MAJOR_VERSION == 2
38841 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
38842  PyObject *exception, *value, *tb;
38843  int res;
38844  __Pyx_PyThreadState_declare
38845  __Pyx_PyThreadState_assign
38846  __Pyx_ErrFetch(&exception, &value, &tb);
38847  res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
38848  if (unlikely(res == -1)) {
38849  PyErr_WriteUnraisable(err);
38850  res = 0;
38851  }
38852  if (!res) {
38853  res = PyObject_IsSubclass(err, exc_type2);
38854  if (unlikely(res == -1)) {
38855  PyErr_WriteUnraisable(err);
38856  res = 0;
38857  }
38858  }
38859  __Pyx_ErrRestore(exception, value, tb);
38860  return res;
38861 }
38862 #else
38863 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
38864  int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
38865  if (!res) {
38866  res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
38867  }
38868  return res;
38869 }
38870 #endif
38871 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
38872  Py_ssize_t i, n;
38873  assert(PyExceptionClass_Check(exc_type));
38874  n = PyTuple_GET_SIZE(tuple);
38875 #if PY_MAJOR_VERSION >= 3
38876  for (i=0; i<n; i++) {
38877  if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
38878  }
38879 #endif
38880  for (i=0; i<n; i++) {
38881  PyObject *t = PyTuple_GET_ITEM(tuple, i);
38882  #if PY_MAJOR_VERSION < 3
38883  if (likely(exc_type == t)) return 1;
38884  #endif
38885  if (likely(PyExceptionClass_Check(t))) {
38886  if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
38887  } else {
38888  }
38889  }
38890  return 0;
38891 }
38892 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
38893  if (likely(err == exc_type)) return 1;
38894  if (likely(PyExceptionClass_Check(err))) {
38895  if (likely(PyExceptionClass_Check(exc_type))) {
38896  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
38897  } else if (likely(PyTuple_Check(exc_type))) {
38898  return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
38899  } else {
38900  }
38901  }
38902  return PyErr_GivenExceptionMatches(err, exc_type);
38903 }
38904 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
38905  assert(PyExceptionClass_Check(exc_type1));
38906  assert(PyExceptionClass_Check(exc_type2));
38907  if (likely(err == exc_type1 || err == exc_type2)) return 1;
38908  if (likely(PyExceptionClass_Check(err))) {
38909  return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
38910  }
38911  return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
38912 }
38913 #endif
38914 
38915 /* PyIntBinop */
38916 #if !CYTHON_COMPILING_IN_PYPY
38917 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
38918  #if PY_MAJOR_VERSION < 3
38919  if (likely(PyInt_CheckExact(op1))) {
38920  const long b = intval;
38921  long x;
38922  long a = PyInt_AS_LONG(op1);
38923  x = (long)((unsigned long)a + b);
38924  if (likely((x^a) >= 0 || (x^b) >= 0))
38925  return PyInt_FromLong(x);
38926  return PyLong_Type.tp_as_number->nb_add(op1, op2);
38927  }
38928  #endif
38929  #if CYTHON_USE_PYLONG_INTERNALS
38930  if (likely(PyLong_CheckExact(op1))) {
38931  const long b = intval;
38932  long a, x;
38933 #ifdef HAVE_LONG_LONG
38934  const PY_LONG_LONG llb = intval;
38935  PY_LONG_LONG lla, llx;
38936 #endif
38937  const digit* digits = ((PyLongObject*)op1)->ob_digit;
38938  const Py_ssize_t size = Py_SIZE(op1);
38939  if (likely(__Pyx_sst_abs(size) <= 1)) {
38940  a = likely(size) ? digits[0] : 0;
38941  if (size == -1) a = -a;
38942  } else {
38943  switch (size) {
38944  case -2:
38945  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
38946  a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38947  break;
38948 #ifdef HAVE_LONG_LONG
38949  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
38950  lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38951  goto long_long;
38952 #endif
38953  }
38954  CYTHON_FALLTHROUGH;
38955  case 2:
38956  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
38957  a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38958  break;
38959 #ifdef HAVE_LONG_LONG
38960  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
38961  lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38962  goto long_long;
38963 #endif
38964  }
38965  CYTHON_FALLTHROUGH;
38966  case -3:
38967  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
38968  a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38969  break;
38970 #ifdef HAVE_LONG_LONG
38971  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
38972  lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38973  goto long_long;
38974 #endif
38975  }
38976  CYTHON_FALLTHROUGH;
38977  case 3:
38978  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
38979  a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38980  break;
38981 #ifdef HAVE_LONG_LONG
38982  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
38983  lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38984  goto long_long;
38985 #endif
38986  }
38987  CYTHON_FALLTHROUGH;
38988  case -4:
38989  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
38990  a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
38991  break;
38992 #ifdef HAVE_LONG_LONG
38993  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
38994  lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
38995  goto long_long;
38996 #endif
38997  }
38998  CYTHON_FALLTHROUGH;
38999  case 4:
39000  if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
39001  a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
39002  break;
39003 #ifdef HAVE_LONG_LONG
39004  } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
39005  lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
39006  goto long_long;
39007 #endif
39008  }
39009  CYTHON_FALLTHROUGH;
39010  default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
39011  }
39012  }
39013  x = a + b;
39014  return PyLong_FromLong(x);
39015 #ifdef HAVE_LONG_LONG
39016  long_long:
39017  llx = lla + llb;
39018  return PyLong_FromLongLong(llx);
39019 #endif
39020 
39021 
39022  }
39023  #endif
39024  if (PyFloat_CheckExact(op1)) {
39025  const long b = intval;
39026  double a = PyFloat_AS_DOUBLE(op1);
39027  double result;
39028  PyFPE_START_PROTECT("add", return NULL)
39029  result = ((double)a) + (double)b;
39030  PyFPE_END_PROTECT(result)
39031  return PyFloat_FromDouble(result);
39032  }
39033  return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
39034 }
39035 #endif
39036 
39037 /* None */
39038 static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
39039  PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
39040 }
39041 
39042 /* None */
39043 static CYTHON_INLINE long __Pyx_div_long(long a, long b) {
39044  long q = a / b;
39045  long r = a - q*b;
39046  q -= ((r != 0) & ((r ^ b) < 0));
39047  return q;
39048 }
39049 
39050 /* ImportFrom */
39051 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
39052  PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
39053  if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
39054  PyErr_Format(PyExc_ImportError,
39055  #if PY_MAJOR_VERSION < 3
39056  "cannot import name %.230s", PyString_AS_STRING(name));
39057  #else
39058  "cannot import name %S", name);
39059  #endif
39060  }
39061  return value;
39062 }
39063 
39064 /* HasAttr */
39065 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
39066  PyObject *r;
39067  if (unlikely(!__Pyx_PyBaseString_Check(n))) {
39068  PyErr_SetString(PyExc_TypeError,
39069  "hasattr(): attribute name must be string");
39070  return -1;
39071  }
39072  r = __Pyx_GetAttr(o, n);
39073  if (unlikely(!r)) {
39074  PyErr_Clear();
39075  return 0;
39076  } else {
39077  Py_DECREF(r);
39078  return 1;
39079  }
39080 }
39081 
39082 /* StringJoin */
39083 #if !CYTHON_COMPILING_IN_CPYTHON
39084 static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
39085  return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
39086 }
39087 #endif
39088 
39089 /* PyObject_GenericGetAttrNoDict */
39090 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
39091 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
39092  PyErr_Format(PyExc_AttributeError,
39093 #if PY_MAJOR_VERSION >= 3
39094  "'%.50s' object has no attribute '%U'",
39095  tp->tp_name, attr_name);
39096 #else
39097  "'%.50s' object has no attribute '%.400s'",
39098  tp->tp_name, PyString_AS_STRING(attr_name));
39099 #endif
39100  return NULL;
39101 }
39102 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
39103  PyObject *descr;
39104  PyTypeObject *tp = Py_TYPE(obj);
39105  if (unlikely(!PyString_Check(attr_name))) {
39106  return PyObject_GenericGetAttr(obj, attr_name);
39107  }
39108  assert(!tp->tp_dictoffset);
39109  descr = _PyType_Lookup(tp, attr_name);
39110  if (unlikely(!descr)) {
39111  return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
39112  }
39113  Py_INCREF(descr);
39114  #if PY_MAJOR_VERSION < 3
39115  if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
39116  #endif
39117  {
39118  descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
39119  if (unlikely(f)) {
39120  PyObject *res = f(descr, obj, (PyObject *)tp);
39121  Py_DECREF(descr);
39122  return res;
39123  }
39124  }
39125  return descr;
39126 }
39127 #endif
39128 
39129 /* PyObject_GenericGetAttr */
39130 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
39131 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
39132  if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
39133  return PyObject_GenericGetAttr(obj, attr_name);
39134  }
39135  return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
39136 }
39137 #endif
39138 
39139 /* SetupReduce */
39140 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
39141  int ret;
39142  PyObject *name_attr;
39143  name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name_2);
39144  if (likely(name_attr)) {
39145  ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
39146  } else {
39147  ret = -1;
39148  }
39149  if (unlikely(ret < 0)) {
39150  PyErr_Clear();
39151  ret = 0;
39152  }
39153  Py_XDECREF(name_attr);
39154  return ret;
39155 }
39156 static int __Pyx_setup_reduce(PyObject* type_obj) {
39157  int ret = 0;
39158  PyObject *object_reduce = NULL;
39159  PyObject *object_reduce_ex = NULL;
39160  PyObject *reduce = NULL;
39161  PyObject *reduce_ex = NULL;
39162  PyObject *reduce_cython = NULL;
39163  PyObject *setstate = NULL;
39164  PyObject *setstate_cython = NULL;
39165 #if CYTHON_USE_PYTYPE_LOOKUP
39166  if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD;
39167 #else
39168  if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD;
39169 #endif
39170 #if CYTHON_USE_PYTYPE_LOOKUP
39171  object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
39172 #else
39173  object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD;
39174 #endif
39175  reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD;
39176  if (reduce_ex == object_reduce_ex) {
39177 #if CYTHON_USE_PYTYPE_LOOKUP
39178  object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
39179 #else
39180  object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD;
39181 #endif
39182  reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD;
39183  if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
39184  reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD;
39185  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD;
39186  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD;
39187  setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate);
39188  if (!setstate) PyErr_Clear();
39189  if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
39190  setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD;
39191  ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD;
39192  ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD;
39193  }
39194  PyType_Modified((PyTypeObject*)type_obj);
39195  }
39196  }
39197  goto GOOD;
39198 BAD:
39199  if (!PyErr_Occurred())
39200  PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name);
39201  ret = -1;
39202 GOOD:
39203 #if !CYTHON_USE_PYTYPE_LOOKUP
39204  Py_XDECREF(object_reduce);
39205  Py_XDECREF(object_reduce_ex);
39206 #endif
39207  Py_XDECREF(reduce);
39208  Py_XDECREF(reduce_ex);
39209  Py_XDECREF(reduce_cython);
39210  Py_XDECREF(setstate);
39211  Py_XDECREF(setstate_cython);
39212  return ret;
39213 }
39214 
39215 /* SetVTable */
39216 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
39217 #if PY_VERSION_HEX >= 0x02070000
39218  PyObject *ob = PyCapsule_New(vtable, 0, 0);
39219 #else
39220  PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
39221 #endif
39222  if (!ob)
39223  goto bad;
39224  if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
39225  goto bad;
39226  Py_DECREF(ob);
39227  return 0;
39228 bad:
39229  Py_XDECREF(ob);
39230  return -1;
39231 }
39232 
39233 /* TypeImport */
39234 #ifndef __PYX_HAVE_RT_ImportType
39235 #define __PYX_HAVE_RT_ImportType
39236 static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name,
39237  size_t size, enum __Pyx_ImportType_CheckSize check_size)
39238 {
39239  PyObject *result = 0;
39240  char warning[200];
39241  Py_ssize_t basicsize;
39242 #ifdef Py_LIMITED_API
39243  PyObject *py_basicsize;
39244 #endif
39245  result = PyObject_GetAttrString(module, class_name);
39246  if (!result)
39247  goto bad;
39248  if (!PyType_Check(result)) {
39249  PyErr_Format(PyExc_TypeError,
39250  "%.200s.%.200s is not a type object",
39251  module_name, class_name);
39252  goto bad;
39253  }
39254 #ifndef Py_LIMITED_API
39255  basicsize = ((PyTypeObject *)result)->tp_basicsize;
39256 #else
39257  py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
39258  if (!py_basicsize)
39259  goto bad;
39260  basicsize = PyLong_AsSsize_t(py_basicsize);
39261  Py_DECREF(py_basicsize);
39262  py_basicsize = 0;
39263  if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
39264  goto bad;
39265 #endif
39266  if ((size_t)basicsize < size) {
39267  PyErr_Format(PyExc_ValueError,
39268  "%.200s.%.200s size changed, may indicate binary incompatibility. "
39269  "Expected %zd from C header, got %zd from PyObject",
39270  module_name, class_name, size, basicsize);
39271  goto bad;
39272  }
39273  if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) {
39274  PyErr_Format(PyExc_ValueError,
39275  "%.200s.%.200s size changed, may indicate binary incompatibility. "
39276  "Expected %zd from C header, got %zd from PyObject",
39277  module_name, class_name, size, basicsize);
39278  goto bad;
39279  }
39280  else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) {
39281  PyOS_snprintf(warning, sizeof(warning),
39282  "%s.%s size changed, may indicate binary incompatibility. "
39283  "Expected %zd from C header, got %zd from PyObject",
39284  module_name, class_name, size, basicsize);
39285  if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
39286  }
39287  return (PyTypeObject *)result;
39288 bad:
39289  Py_XDECREF(result);
39290  return NULL;
39291 }
39292 #endif
39293 
39294 /* CLineInTraceback */
39295 #ifndef CYTHON_CLINE_IN_TRACEBACK
39296 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
39297  PyObject *use_cline;
39298  PyObject *ptype, *pvalue, *ptraceback;
39299 #if CYTHON_COMPILING_IN_CPYTHON
39300  PyObject **cython_runtime_dict;
39301 #endif
39302  if (unlikely(!__pyx_cython_runtime)) {
39303  return c_line;
39304  }
39305  __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
39306 #if CYTHON_COMPILING_IN_CPYTHON
39307  cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
39308  if (likely(cython_runtime_dict)) {
39309  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
39310  use_cline, *cython_runtime_dict,
39311  __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
39312  } else
39313 #endif
39314  {
39315  PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
39316  if (use_cline_obj) {
39317  use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
39318  Py_DECREF(use_cline_obj);
39319  } else {
39320  PyErr_Clear();
39321  use_cline = NULL;
39322  }
39323  }
39324  if (!use_cline) {
39325  c_line = 0;
39326  PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
39327  }
39328  else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
39329  c_line = 0;
39330  }
39331  __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
39332  return c_line;
39333 }
39334 #endif
39335 
39336 /* CodeObjectCache */
39337 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
39338  int start = 0, mid = 0, end = count - 1;
39339  if (end >= 0 && code_line > entries[end].code_line) {
39340  return count;
39341  }
39342  while (start < end) {
39343  mid = start + (end - start) / 2;
39344  if (code_line < entries[mid].code_line) {
39345  end = mid;
39346  } else if (code_line > entries[mid].code_line) {
39347  start = mid + 1;
39348  } else {
39349  return mid;
39350  }
39351  }
39352  if (code_line <= entries[mid].code_line) {
39353  return mid;
39354  } else {
39355  return mid + 1;
39356  }
39357 }
39358 static PyCodeObject *__pyx_find_code_object(int code_line) {
39359  PyCodeObject* code_object;
39360  int pos;
39361  if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
39362  return NULL;
39363  }
39364  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
39365  if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
39366  return NULL;
39367  }
39368  code_object = __pyx_code_cache.entries[pos].code_object;
39369  Py_INCREF(code_object);
39370  return code_object;
39371 }
39372 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
39373  int pos, i;
39374  __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
39375  if (unlikely(!code_line)) {
39376  return;
39377  }
39378  if (unlikely(!entries)) {
39379  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
39380  if (likely(entries)) {
39381  __pyx_code_cache.entries = entries;
39382  __pyx_code_cache.max_count = 64;
39383  __pyx_code_cache.count = 1;
39384  entries[0].code_line = code_line;
39385  entries[0].code_object = code_object;
39386  Py_INCREF(code_object);
39387  }
39388  return;
39389  }
39390  pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
39391  if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
39392  PyCodeObject* tmp = entries[pos].code_object;
39393  entries[pos].code_object = code_object;
39394  Py_DECREF(tmp);
39395  return;
39396  }
39397  if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
39398  int new_max = __pyx_code_cache.max_count + 64;
39399  entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
39400  __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
39401  if (unlikely(!entries)) {
39402  return;
39403  }
39404  __pyx_code_cache.entries = entries;
39405  __pyx_code_cache.max_count = new_max;
39406  }
39407  for (i=__pyx_code_cache.count; i>pos; i--) {
39408  entries[i] = entries[i-1];
39409  }
39410  entries[pos].code_line = code_line;
39411  entries[pos].code_object = code_object;
39412  __pyx_code_cache.count++;
39413  Py_INCREF(code_object);
39414 }
39415 
39416 /* AddTraceback */
39417 #include "compile.h"
39418 #include "frameobject.h"
39419 #include "traceback.h"
39420 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
39421  const char *funcname, int c_line,
39422  int py_line, const char *filename) {
39423  PyCodeObject *py_code = 0;
39424  PyObject *py_srcfile = 0;
39425  PyObject *py_funcname = 0;
39426  #if PY_MAJOR_VERSION < 3
39427  py_srcfile = PyString_FromString(filename);
39428  #else
39429  py_srcfile = PyUnicode_FromString(filename);
39430  #endif
39431  if (!py_srcfile) goto bad;
39432  if (c_line) {
39433  #if PY_MAJOR_VERSION < 3
39434  py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
39435  #else
39436  py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
39437  #endif
39438  }
39439  else {
39440  #if PY_MAJOR_VERSION < 3
39441  py_funcname = PyString_FromString(funcname);
39442  #else
39443  py_funcname = PyUnicode_FromString(funcname);
39444  #endif
39445  }
39446  if (!py_funcname) goto bad;
39447  py_code = __Pyx_PyCode_New(
39448  0,
39449  0,
39450  0,
39451  0,
39452  0,
39453  __pyx_empty_bytes, /*PyObject *code,*/
39454  __pyx_empty_tuple, /*PyObject *consts,*/
39455  __pyx_empty_tuple, /*PyObject *names,*/
39456  __pyx_empty_tuple, /*PyObject *varnames,*/
39457  __pyx_empty_tuple, /*PyObject *freevars,*/
39458  __pyx_empty_tuple, /*PyObject *cellvars,*/
39459  py_srcfile, /*PyObject *filename,*/
39460  py_funcname, /*PyObject *name,*/
39461  py_line,
39462  __pyx_empty_bytes /*PyObject *lnotab*/
39463  );
39464  Py_DECREF(py_srcfile);
39465  Py_DECREF(py_funcname);
39466  return py_code;
39467 bad:
39468  Py_XDECREF(py_srcfile);
39469  Py_XDECREF(py_funcname);
39470  return NULL;
39471 }
39472 static void __Pyx_AddTraceback(const char *funcname, int c_line,
39473  int py_line, const char *filename) {
39474  PyCodeObject *py_code = 0;
39475  PyFrameObject *py_frame = 0;
39476  PyThreadState *tstate = __Pyx_PyThreadState_Current;
39477  if (c_line) {
39478  c_line = __Pyx_CLineForTraceback(tstate, c_line);
39479  }
39480  py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
39481  if (!py_code) {
39482  py_code = __Pyx_CreateCodeObjectForTraceback(
39483  funcname, c_line, py_line, filename);
39484  if (!py_code) goto bad;
39485  __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
39486  }
39487  py_frame = PyFrame_New(
39488  tstate, /*PyThreadState *tstate,*/
39489  py_code, /*PyCodeObject *code,*/
39490  __pyx_d, /*PyObject *globals,*/
39491  0 /*PyObject *locals*/
39492  );
39493  if (!py_frame) goto bad;
39494  __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
39495  PyTraceBack_Here(py_frame);
39496 bad:
39497  Py_XDECREF(py_code);
39498  Py_XDECREF(py_frame);
39499 }
39500 
39501 /* CIntFromPyVerify */
39502 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
39503  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
39504 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
39505  __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
39506 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
39507  {\
39508  func_type value = func_value;\
39509  if (sizeof(target_type) < sizeof(func_type)) {\
39510  if (unlikely(value != (func_type) (target_type) value)) {\
39511  func_type zero = 0;\
39512  if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
39513  return (target_type) -1;\
39514  if (is_unsigned && unlikely(value < zero))\
39515  goto raise_neg_overflow;\
39516  else\
39517  goto raise_overflow;\
39518  }\
39519  }\
39520  return (target_type) value;\
39521  }
39522 
39523 /* CIntToPy */
39524 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
39525  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
39526  const int is_unsigned = neg_one > const_zero;
39527  if (is_unsigned) {
39528  if (sizeof(int) < sizeof(long)) {
39529  return PyInt_FromLong((long) value);
39530  } else if (sizeof(int) <= sizeof(unsigned long)) {
39531  return PyLong_FromUnsignedLong((unsigned long) value);
39532 #ifdef HAVE_LONG_LONG
39533  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
39534  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
39535 #endif
39536  }
39537  } else {
39538  if (sizeof(int) <= sizeof(long)) {
39539  return PyInt_FromLong((long) value);
39540 #ifdef HAVE_LONG_LONG
39541  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
39542  return PyLong_FromLongLong((PY_LONG_LONG) value);
39543 #endif
39544  }
39545  }
39546  {
39547  int one = 1; int little = (int)*(unsigned char *)&one;
39548  unsigned char *bytes = (unsigned char *)&value;
39549  return _PyLong_FromByteArray(bytes, sizeof(int),
39550  little, !is_unsigned);
39551  }
39552 }
39553 
39554 /* MemviewDtypeToObject */
39555 static CYTHON_INLINE PyObject *__pyx_memview_get_int(const char *itemp) {
39556  return (PyObject *) __Pyx_PyInt_From_int(*(int *) itemp);
39557 }
39558 static CYTHON_INLINE int __pyx_memview_set_int(const char *itemp, PyObject *obj) {
39559  int value = __Pyx_PyInt_As_int(obj);
39560  if ((value == (int)-1) && PyErr_Occurred())
39561  return 0;
39562  *(int *) itemp = value;
39563  return 1;
39564 }
39565 
39566 /* MemviewDtypeToObject */
39567 static CYTHON_INLINE PyObject *__pyx_memview_get_double(const char *itemp) {
39568  return (PyObject *) PyFloat_FromDouble(*(double *) itemp);
39569 }
39570 static CYTHON_INLINE int __pyx_memview_set_double(const char *itemp, PyObject *obj) {
39571  double value = __pyx_PyFloat_AsDouble(obj);
39572  if ((value == (double)-1) && PyErr_Occurred())
39573  return 0;
39574  *(double *) itemp = value;
39575  return 1;
39576 }
39577 
39578 /* Print */
39579 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
39580 static PyObject *__Pyx_GetStdout(void) {
39581  PyObject *f = PySys_GetObject((char *)"stdout");
39582  if (!f) {
39583  PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout");
39584  }
39585  return f;
39586 }
39587 static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) {
39588  int i;
39589  if (!f) {
39590  if (!(f = __Pyx_GetStdout()))
39591  return -1;
39592  }
39593  Py_INCREF(f);
39594  for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) {
39595  PyObject* v;
39596  if (PyFile_SoftSpace(f, 1)) {
39597  if (PyFile_WriteString(" ", f) < 0)
39598  goto error;
39599  }
39600  v = PyTuple_GET_ITEM(arg_tuple, i);
39601  if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0)
39602  goto error;
39603  if (PyString_Check(v)) {
39604  char *s = PyString_AsString(v);
39605  Py_ssize_t len = PyString_Size(v);
39606  if (len > 0) {
39607  switch (s[len-1]) {
39608  case ' ': break;
39609  case '\f': case '\r': case '\n': case '\t': case '\v':
39610  PyFile_SoftSpace(f, 0);
39611  break;
39612  default: break;
39613  }
39614  }
39615  }
39616  }
39617  if (newline) {
39618  if (PyFile_WriteString("\n", f) < 0)
39619  goto error;
39620  PyFile_SoftSpace(f, 0);
39621  }
39622  Py_DECREF(f);
39623  return 0;
39624 error:
39625  Py_DECREF(f);
39626  return -1;
39627 }
39628 #else
39629 static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) {
39630  PyObject* kwargs = 0;
39631  PyObject* result = 0;
39632  PyObject* end_string;
39633  if (unlikely(!__pyx_print)) {
39634  __pyx_print = PyObject_GetAttr(__pyx_b, __pyx_n_s_print);
39635  if (!__pyx_print)
39636  return -1;
39637  }
39638  if (stream) {
39639  kwargs = PyDict_New();
39640  if (unlikely(!kwargs))
39641  return -1;
39642  if (unlikely(PyDict_SetItem(kwargs, __pyx_n_s_file, stream) < 0))
39643  goto bad;
39644  if (!newline) {
39645  end_string = PyUnicode_FromStringAndSize(" ", 1);
39646  if (unlikely(!end_string))
39647  goto bad;
39648  if (PyDict_SetItem(kwargs, __pyx_n_s_end, end_string) < 0) {
39649  Py_DECREF(end_string);
39650  goto bad;
39651  }
39652  Py_DECREF(end_string);
39653  }
39654  } else if (!newline) {
39655  if (unlikely(!__pyx_print_kwargs)) {
39656  __pyx_print_kwargs = PyDict_New();
39657  if (unlikely(!__pyx_print_kwargs))
39658  return -1;
39659  end_string = PyUnicode_FromStringAndSize(" ", 1);
39660  if (unlikely(!end_string))
39661  return -1;
39662  if (PyDict_SetItem(__pyx_print_kwargs, __pyx_n_s_end, end_string) < 0) {
39663  Py_DECREF(end_string);
39664  return -1;
39665  }
39666  Py_DECREF(end_string);
39667  }
39668  kwargs = __pyx_print_kwargs;
39669  }
39670  result = PyObject_Call(__pyx_print, arg_tuple, kwargs);
39671  if (unlikely(kwargs) && (kwargs != __pyx_print_kwargs))
39672  Py_DECREF(kwargs);
39673  if (!result)
39674  return -1;
39675  Py_DECREF(result);
39676  return 0;
39677 bad:
39678  if (kwargs != __pyx_print_kwargs)
39679  Py_XDECREF(kwargs);
39680  return -1;
39681 }
39682 #endif
39683 
39684 /* Declarations */
39685 #if CYTHON_CCOMPLEX
39686  #ifdef __cplusplus
39687  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
39688  return ::std::complex< float >(x, y);
39689  }
39690  #else
39691  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
39692  return x + y*(__pyx_t_float_complex)_Complex_I;
39693  }
39694  #endif
39695 #else
39696  static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) {
39697  __pyx_t_float_complex z;
39698  z.real = x;
39699  z.imag = y;
39700  return z;
39701  }
39702 #endif
39703 
39704 /* Arithmetic */
39705 #if CYTHON_CCOMPLEX
39706 #else
39707  static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39708  return (a.real == b.real) && (a.imag == b.imag);
39709  }
39710  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_sum_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39711  __pyx_t_float_complex z;
39712  z.real = a.real + b.real;
39713  z.imag = a.imag + b.imag;
39714  return z;
39715  }
39716  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_diff_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39717  __pyx_t_float_complex z;
39718  z.real = a.real - b.real;
39719  z.imag = a.imag - b.imag;
39720  return z;
39721  }
39722  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_prod_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39723  __pyx_t_float_complex z;
39724  z.real = a.real * b.real - a.imag * b.imag;
39725  z.imag = a.real * b.imag + a.imag * b.real;
39726  return z;
39727  }
39728  #if 1
39729  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39730  if (b.imag == 0) {
39731  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
39732  } else if (fabsf(b.real) >= fabsf(b.imag)) {
39733  if (b.real == 0 && b.imag == 0) {
39734  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.imag);
39735  } else {
39736  float r = b.imag / b.real;
39737  float s = 1.0 / (b.real + b.imag * r);
39738  return __pyx_t_float_complex_from_parts(
39739  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
39740  }
39741  } else {
39742  float r = b.real / b.imag;
39743  float s = 1.0 / (b.imag + b.real * r);
39744  return __pyx_t_float_complex_from_parts(
39745  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
39746  }
39747  }
39748  #else
39749  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_quot_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39750  if (b.imag == 0) {
39751  return __pyx_t_float_complex_from_parts(a.real / b.real, a.imag / b.real);
39752  } else {
39753  float denom = b.real * b.real + b.imag * b.imag;
39754  return __pyx_t_float_complex_from_parts(
39755  (a.real * b.real + a.imag * b.imag) / denom,
39756  (a.imag * b.real - a.real * b.imag) / denom);
39757  }
39758  }
39759  #endif
39760  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_neg_float(__pyx_t_float_complex a) {
39761  __pyx_t_float_complex z;
39762  z.real = -a.real;
39763  z.imag = -a.imag;
39764  return z;
39765  }
39766  static CYTHON_INLINE int __Pyx_c_is_zero_float(__pyx_t_float_complex a) {
39767  return (a.real == 0) && (a.imag == 0);
39768  }
39769  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_conj_float(__pyx_t_float_complex a) {
39770  __pyx_t_float_complex z;
39771  z.real = a.real;
39772  z.imag = -a.imag;
39773  return z;
39774  }
39775  #if 1
39776  static CYTHON_INLINE float __Pyx_c_abs_float(__pyx_t_float_complex z) {
39777  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
39778  return sqrtf(z.real*z.real + z.imag*z.imag);
39779  #else
39780  return hypotf(z.real, z.imag);
39781  #endif
39782  }
39783  static CYTHON_INLINE __pyx_t_float_complex __Pyx_c_pow_float(__pyx_t_float_complex a, __pyx_t_float_complex b) {
39784  __pyx_t_float_complex z;
39785  float r, lnr, theta, z_r, z_theta;
39786  if (b.imag == 0 && b.real == (int)b.real) {
39787  if (b.real < 0) {
39788  float denom = a.real * a.real + a.imag * a.imag;
39789  a.real = a.real / denom;
39790  a.imag = -a.imag / denom;
39791  b.real = -b.real;
39792  }
39793  switch ((int)b.real) {
39794  case 0:
39795  z.real = 1;
39796  z.imag = 0;
39797  return z;
39798  case 1:
39799  return a;
39800  case 2:
39801  z = __Pyx_c_prod_float(a, a);
39802  return __Pyx_c_prod_float(a, a);
39803  case 3:
39804  z = __Pyx_c_prod_float(a, a);
39805  return __Pyx_c_prod_float(z, a);
39806  case 4:
39807  z = __Pyx_c_prod_float(a, a);
39808  return __Pyx_c_prod_float(z, z);
39809  }
39810  }
39811  if (a.imag == 0) {
39812  if (a.real == 0) {
39813  return a;
39814  } else if (b.imag == 0) {
39815  z.real = powf(a.real, b.real);
39816  z.imag = 0;
39817  return z;
39818  } else if (a.real > 0) {
39819  r = a.real;
39820  theta = 0;
39821  } else {
39822  r = -a.real;
39823  theta = atan2f(0, -1);
39824  }
39825  } else {
39826  r = __Pyx_c_abs_float(a);
39827  theta = atan2f(a.imag, a.real);
39828  }
39829  lnr = logf(r);
39830  z_r = expf(lnr * b.real - theta * b.imag);
39831  z_theta = theta * b.real + lnr * b.imag;
39832  z.real = z_r * cosf(z_theta);
39833  z.imag = z_r * sinf(z_theta);
39834  return z;
39835  }
39836  #endif
39837 #endif
39838 
39839 /* Declarations */
39840 #if CYTHON_CCOMPLEX
39841  #ifdef __cplusplus
39842  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
39843  return ::std::complex< double >(x, y);
39844  }
39845  #else
39846  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
39847  return x + y*(__pyx_t_double_complex)_Complex_I;
39848  }
39849  #endif
39850 #else
39851  static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) {
39852  __pyx_t_double_complex z;
39853  z.real = x;
39854  z.imag = y;
39855  return z;
39856  }
39857 #endif
39858 
39859 /* Arithmetic */
39860 #if CYTHON_CCOMPLEX
39861 #else
39862  static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39863  return (a.real == b.real) && (a.imag == b.imag);
39864  }
39865  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_sum_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39866  __pyx_t_double_complex z;
39867  z.real = a.real + b.real;
39868  z.imag = a.imag + b.imag;
39869  return z;
39870  }
39871  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_diff_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39872  __pyx_t_double_complex z;
39873  z.real = a.real - b.real;
39874  z.imag = a.imag - b.imag;
39875  return z;
39876  }
39877  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_prod_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39878  __pyx_t_double_complex z;
39879  z.real = a.real * b.real - a.imag * b.imag;
39880  z.imag = a.real * b.imag + a.imag * b.real;
39881  return z;
39882  }
39883  #if 1
39884  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39885  if (b.imag == 0) {
39886  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
39887  } else if (fabs(b.real) >= fabs(b.imag)) {
39888  if (b.real == 0 && b.imag == 0) {
39889  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.imag);
39890  } else {
39891  double r = b.imag / b.real;
39892  double s = 1.0 / (b.real + b.imag * r);
39893  return __pyx_t_double_complex_from_parts(
39894  (a.real + a.imag * r) * s, (a.imag - a.real * r) * s);
39895  }
39896  } else {
39897  double r = b.real / b.imag;
39898  double s = 1.0 / (b.imag + b.real * r);
39899  return __pyx_t_double_complex_from_parts(
39900  (a.real * r + a.imag) * s, (a.imag * r - a.real) * s);
39901  }
39902  }
39903  #else
39904  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_quot_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39905  if (b.imag == 0) {
39906  return __pyx_t_double_complex_from_parts(a.real / b.real, a.imag / b.real);
39907  } else {
39908  double denom = b.real * b.real + b.imag * b.imag;
39909  return __pyx_t_double_complex_from_parts(
39910  (a.real * b.real + a.imag * b.imag) / denom,
39911  (a.imag * b.real - a.real * b.imag) / denom);
39912  }
39913  }
39914  #endif
39915  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_neg_double(__pyx_t_double_complex a) {
39916  __pyx_t_double_complex z;
39917  z.real = -a.real;
39918  z.imag = -a.imag;
39919  return z;
39920  }
39921  static CYTHON_INLINE int __Pyx_c_is_zero_double(__pyx_t_double_complex a) {
39922  return (a.real == 0) && (a.imag == 0);
39923  }
39924  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_conj_double(__pyx_t_double_complex a) {
39925  __pyx_t_double_complex z;
39926  z.real = a.real;
39927  z.imag = -a.imag;
39928  return z;
39929  }
39930  #if 1
39931  static CYTHON_INLINE double __Pyx_c_abs_double(__pyx_t_double_complex z) {
39932  #if !defined(HAVE_HYPOT) || defined(_MSC_VER)
39933  return sqrt(z.real*z.real + z.imag*z.imag);
39934  #else
39935  return hypot(z.real, z.imag);
39936  #endif
39937  }
39938  static CYTHON_INLINE __pyx_t_double_complex __Pyx_c_pow_double(__pyx_t_double_complex a, __pyx_t_double_complex b) {
39939  __pyx_t_double_complex z;
39940  double r, lnr, theta, z_r, z_theta;
39941  if (b.imag == 0 && b.real == (int)b.real) {
39942  if (b.real < 0) {
39943  double denom = a.real * a.real + a.imag * a.imag;
39944  a.real = a.real / denom;
39945  a.imag = -a.imag / denom;
39946  b.real = -b.real;
39947  }
39948  switch ((int)b.real) {
39949  case 0:
39950  z.real = 1;
39951  z.imag = 0;
39952  return z;
39953  case 1:
39954  return a;
39955  case 2:
39956  z = __Pyx_c_prod_double(a, a);
39957  return __Pyx_c_prod_double(a, a);
39958  case 3:
39959  z = __Pyx_c_prod_double(a, a);
39960  return __Pyx_c_prod_double(z, a);
39961  case 4:
39962  z = __Pyx_c_prod_double(a, a);
39963  return __Pyx_c_prod_double(z, z);
39964  }
39965  }
39966  if (a.imag == 0) {
39967  if (a.real == 0) {
39968  return a;
39969  } else if (b.imag == 0) {
39970  z.real = pow(a.real, b.real);
39971  z.imag = 0;
39972  return z;
39973  } else if (a.real > 0) {
39974  r = a.real;
39975  theta = 0;
39976  } else {
39977  r = -a.real;
39978  theta = atan2(0, -1);
39979  }
39980  } else {
39981  r = __Pyx_c_abs_double(a);
39982  theta = atan2(a.imag, a.real);
39983  }
39984  lnr = log(r);
39985  z_r = exp(lnr * b.real - theta * b.imag);
39986  z_theta = theta * b.real + lnr * b.imag;
39987  z.real = z_r * cos(z_theta);
39988  z.imag = z_r * sin(z_theta);
39989  return z;
39990  }
39991  #endif
39992 #endif
39993 
39994 /* CIntToPy */
39995 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) {
39996  const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0;
39997  const int is_unsigned = neg_one > const_zero;
39998  if (is_unsigned) {
39999  if (sizeof(enum NPY_TYPES) < sizeof(long)) {
40000  return PyInt_FromLong((long) value);
40001  } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) {
40002  return PyLong_FromUnsignedLong((unsigned long) value);
40003 #ifdef HAVE_LONG_LONG
40004  } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) {
40005  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
40006 #endif
40007  }
40008  } else {
40009  if (sizeof(enum NPY_TYPES) <= sizeof(long)) {
40010  return PyInt_FromLong((long) value);
40011 #ifdef HAVE_LONG_LONG
40012  } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) {
40013  return PyLong_FromLongLong((PY_LONG_LONG) value);
40014 #endif
40015  }
40016  }
40017  {
40018  int one = 1; int little = (int)*(unsigned char *)&one;
40019  unsigned char *bytes = (unsigned char *)&value;
40020  return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES),
40021  little, !is_unsigned);
40022  }
40023 }
40024 
40025 #if PY_MAJOR_VERSION < 3
40026 static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) {
40027  if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags);
40028  if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags);
40029  if (__Pyx_TypeCheck(obj, __pyx_array_type)) return __pyx_array_getbuffer(obj, view, flags);
40030  if (__Pyx_TypeCheck(obj, __pyx_memoryview_type)) return __pyx_memoryview_getbuffer(obj, view, flags);
40031  PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name);
40032  return -1;
40033 }
40034 static void __Pyx_ReleaseBuffer(Py_buffer *view) {
40035  PyObject *obj = view->obj;
40036  if (!obj) return;
40037  if (PyObject_CheckBuffer(obj)) {
40038  PyBuffer_Release(view);
40039  return;
40040  }
40041  if ((0)) {}
40042  else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view);
40043  view->obj = NULL;
40044  Py_DECREF(obj);
40045 }
40046 #endif
40047 
40048 
40049 /* MemviewSliceIsContig */
40050 static int
40051 __pyx_memviewslice_is_contig(const __Pyx_memviewslice mvs, char order, int ndim)
40052 {
40053  int i, index, step, start;
40054  Py_ssize_t itemsize = mvs.memview->view.itemsize;
40055  if (order == 'F') {
40056  step = 1;
40057  start = 0;
40058  } else {
40059  step = -1;
40060  start = ndim - 1;
40061  }
40062  for (i = 0; i < ndim; i++) {
40063  index = start + step * i;
40064  if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize)
40065  return 0;
40066  itemsize *= mvs.shape[index];
40067  }
40068  return 1;
40069 }
40070 
40071 /* OverlappingSlices */
40072 static void
40073 __pyx_get_array_memory_extents(__Pyx_memviewslice *slice,
40074  void **out_start, void **out_end,
40075  int ndim, size_t itemsize)
40076 {
40077  char *start, *end;
40078  int i;
40079  start = end = slice->data;
40080  for (i = 0; i < ndim; i++) {
40081  Py_ssize_t stride = slice->strides[i];
40082  Py_ssize_t extent = slice->shape[i];
40083  if (extent == 0) {
40084  *out_start = *out_end = start;
40085  return;
40086  } else {
40087  if (stride > 0)
40088  end += stride * (extent - 1);
40089  else
40090  start += stride * (extent - 1);
40091  }
40092  }
40093  *out_start = start;
40094  *out_end = end + itemsize;
40095 }
40096 static int
40097 __pyx_slices_overlap(__Pyx_memviewslice *slice1,
40098  __Pyx_memviewslice *slice2,
40099  int ndim, size_t itemsize)
40100 {
40101  void *start1, *end1, *start2, *end2;
40102  __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize);
40103  __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize);
40104  return (start1 < end2) && (start2 < end1);
40105 }
40106 
40107 /* Capsule */
40108 static CYTHON_INLINE PyObject *
40109 __pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
40110 {
40111  PyObject *cobj;
40112 #if PY_VERSION_HEX >= 0x02070000
40113  cobj = PyCapsule_New(p, sig, NULL);
40114 #else
40115  cobj = PyCObject_FromVoidPtr(p, NULL);
40116 #endif
40117  return cobj;
40118 }
40119 
40120 /* CIntFromPy */
40121 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
40122  const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0;
40123  const int is_unsigned = neg_one > const_zero;
40124 #if PY_MAJOR_VERSION < 3
40125  if (likely(PyInt_Check(x))) {
40126  if (sizeof(int) < sizeof(long)) {
40127  __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
40128  } else {
40129  long val = PyInt_AS_LONG(x);
40130  if (is_unsigned && unlikely(val < 0)) {
40131  goto raise_neg_overflow;
40132  }
40133  return (int) val;
40134  }
40135  } else
40136 #endif
40137  if (likely(PyLong_Check(x))) {
40138  if (is_unsigned) {
40139 #if CYTHON_USE_PYLONG_INTERNALS
40140  const digit* digits = ((PyLongObject*)x)->ob_digit;
40141  switch (Py_SIZE(x)) {
40142  case 0: return (int) 0;
40143  case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
40144  case 2:
40145  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
40146  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40147  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40148  } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
40149  return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
40150  }
40151  }
40152  break;
40153  case 3:
40154  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
40155  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40156  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40157  } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
40158  return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
40159  }
40160  }
40161  break;
40162  case 4:
40163  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
40164  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40165  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40166  } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
40167  return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
40168  }
40169  }
40170  break;
40171  }
40172 #endif
40173 #if CYTHON_COMPILING_IN_CPYTHON
40174  if (unlikely(Py_SIZE(x) < 0)) {
40175  goto raise_neg_overflow;
40176  }
40177 #else
40178  {
40179  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
40180  if (unlikely(result < 0))
40181  return (int) -1;
40182  if (unlikely(result == 1))
40183  goto raise_neg_overflow;
40184  }
40185 #endif
40186  if (sizeof(int) <= sizeof(unsigned long)) {
40187  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
40188 #ifdef HAVE_LONG_LONG
40189  } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
40190  __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
40191 #endif
40192  }
40193  } else {
40194 #if CYTHON_USE_PYLONG_INTERNALS
40195  const digit* digits = ((PyLongObject*)x)->ob_digit;
40196  switch (Py_SIZE(x)) {
40197  case 0: return (int) 0;
40198  case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
40199  case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
40200  case -2:
40201  if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
40202  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40203  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40204  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
40205  return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40206  }
40207  }
40208  break;
40209  case 2:
40210  if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
40211  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40212  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40213  } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
40214  return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40215  }
40216  }
40217  break;
40218  case -3:
40219  if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
40220  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40221  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40222  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
40223  return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40224  }
40225  }
40226  break;
40227  case 3:
40228  if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
40229  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40230  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40231  } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
40232  return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40233  }
40234  }
40235  break;
40236  case -4:
40237  if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
40238  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40239  __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40240  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
40241  return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40242  }
40243  }
40244  break;
40245  case 4:
40246  if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
40247  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40248  __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40249  } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
40250  return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
40251  }
40252  }
40253  break;
40254  }
40255 #endif
40256  if (sizeof(int) <= sizeof(long)) {
40257  __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
40258 #ifdef HAVE_LONG_LONG
40259  } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
40260  __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
40261 #endif
40262  }
40263  }
40264  {
40265 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
40266  PyErr_SetString(PyExc_RuntimeError,
40267  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
40268 #else
40269  int val;
40270  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
40271  #if PY_MAJOR_VERSION < 3
40272  if (likely(v) && !PyLong_Check(v)) {
40273  PyObject *tmp = v;
40274  v = PyNumber_Long(tmp);
40275  Py_DECREF(tmp);
40276  }
40277  #endif
40278  if (likely(v)) {
40279  int one = 1; int is_little = (int)*(unsigned char *)&one;
40280  unsigned char *bytes = (unsigned char *)&val;
40281  int ret = _PyLong_AsByteArray((PyLongObject *)v,
40282  bytes, sizeof(val),
40283  is_little, !is_unsigned);
40284  Py_DECREF(v);
40285  if (likely(!ret))
40286  return val;
40287  }
40288 #endif
40289  return (int) -1;
40290  }
40291  } else {
40292  int val;
40293  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
40294  if (!tmp) return (int) -1;
40295  val = __Pyx_PyInt_As_int(tmp);
40296  Py_DECREF(tmp);
40297  return val;
40298  }
40299 raise_overflow:
40300  PyErr_SetString(PyExc_OverflowError,
40301  "value too large to convert to int");
40302  return (int) -1;
40303 raise_neg_overflow:
40304  PyErr_SetString(PyExc_OverflowError,
40305  "can't convert negative value to int");
40306  return (int) -1;
40307 }
40308 
40309 /* TypeInfoToFormat */
40310 static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type) {
40311  struct __pyx_typeinfo_string result = { {0} };
40312  char *buf = (char *) result.string;
40313  size_t size = type->size;
40314  switch (type->typegroup) {
40315  case 'H':
40316  *buf = 'c';
40317  break;
40318  case 'I':
40319  case 'U':
40320  if (size == 1)
40321  *buf = (type->is_unsigned) ? 'B' : 'b';
40322  else if (size == 2)
40323  *buf = (type->is_unsigned) ? 'H' : 'h';
40324  else if (size == 4)
40325  *buf = (type->is_unsigned) ? 'I' : 'i';
40326  else if (size == 8)
40327  *buf = (type->is_unsigned) ? 'Q' : 'q';
40328  break;
40329  case 'P':
40330  *buf = 'P';
40331  break;
40332  case 'C':
40333  {
40334  __Pyx_TypeInfo complex_type = *type;
40335  complex_type.typegroup = 'R';
40336  complex_type.size /= 2;
40337  *buf++ = 'Z';
40338  *buf = __Pyx_TypeInfoToFormat(&complex_type).string[0];
40339  break;
40340  }
40341  case 'R':
40342  if (size == 4)
40343  *buf = 'f';
40344  else if (size == 8)
40345  *buf = 'd';
40346  else
40347  *buf = 'g';
40348  break;
40349  }
40350  return result;
40351 }
40352 
40353 /* PrintOne */
40354 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3
40355 static int __Pyx_PrintOne(PyObject* f, PyObject *o) {
40356  if (!f) {
40357  if (!(f = __Pyx_GetStdout()))
40358  return -1;
40359  }
40360  Py_INCREF(f);
40361  if (PyFile_SoftSpace(f, 0)) {
40362  if (PyFile_WriteString(" ", f) < 0)
40363  goto error;
40364  }
40365  if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0)
40366  goto error;
40367  if (PyFile_WriteString("\n", f) < 0)
40368  goto error;
40369  Py_DECREF(f);
40370  return 0;
40371 error:
40372  Py_DECREF(f);
40373  return -1;
40374  /* the line below is just to avoid C compiler
40375  * warnings about unused functions */
40376  return __Pyx_Print(f, NULL, 0);
40377 }
40378 #else
40379 static int __Pyx_PrintOne(PyObject* stream, PyObject *o) {
40380  int res;
40381  PyObject* arg_tuple = PyTuple_Pack(1, o);
40382  if (unlikely(!arg_tuple))
40383  return -1;
40384  res = __Pyx_Print(stream, arg_tuple, 1);
40385  Py_DECREF(arg_tuple);
40386  return res;
40387 }
40388 #endif
40389 
40390 /* MemviewSliceCopyTemplate */
40391 static __Pyx_memviewslice
40392 __pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs,
40393  const char *mode, int ndim,
40394  size_t sizeof_dtype, int contig_flag,
40395  int dtype_is_object)
40396 {
40397  __Pyx_RefNannyDeclarations
40398  int i;
40399  __Pyx_memviewslice new_mvs = { 0, 0, { 0 }, { 0 }, { 0 } };
40400  struct __pyx_memoryview_obj *from_memview = from_mvs->memview;
40401  Py_buffer *buf = &from_memview->view;
40402  PyObject *shape_tuple = NULL;
40403  PyObject *temp_int = NULL;
40404  struct __pyx_array_obj *array_obj = NULL;
40405  struct __pyx_memoryview_obj *memview_obj = NULL;
40406  __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0);
40407  for (i = 0; i < ndim; i++) {
40408  if (from_mvs->suboffsets[i] >= 0) {
40409  PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with "
40410  "indirect dimensions (axis %d)", i);
40411  goto fail;
40412  }
40413  }
40414  shape_tuple = PyTuple_New(ndim);
40415  if (unlikely(!shape_tuple)) {
40416  goto fail;
40417  }
40418  __Pyx_GOTREF(shape_tuple);
40419  for(i = 0; i < ndim; i++) {
40420  temp_int = PyInt_FromSsize_t(from_mvs->shape[i]);
40421  if(unlikely(!temp_int)) {
40422  goto fail;
40423  } else {
40424  PyTuple_SET_ITEM(shape_tuple, i, temp_int);
40425  temp_int = NULL;
40426  }
40427  }
40428  array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL);
40429  if (unlikely(!array_obj)) {
40430  goto fail;
40431  }
40432  __Pyx_GOTREF(array_obj);
40433  memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new(
40434  (PyObject *) array_obj, contig_flag,
40435  dtype_is_object,
40436  from_mvs->memview->typeinfo);
40437  if (unlikely(!memview_obj))
40438  goto fail;
40439  if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0))
40440  goto fail;
40441  if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim,
40442  dtype_is_object) < 0))
40443  goto fail;
40444  goto no_fail;
40445 fail:
40446  __Pyx_XDECREF(new_mvs.memview);
40447  new_mvs.memview = NULL;
40448  new_mvs.data = NULL;
40449 no_fail:
40450  __Pyx_XDECREF(shape_tuple);
40451  __Pyx_XDECREF(temp_int);
40452  __Pyx_XDECREF(array_obj);
40453  __Pyx_RefNannyFinishContext();
40454  return new_mvs;
40455 }
40456 
40457 /* MemviewSliceInit */
40458 static int
40459 __Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview,
40460  int ndim,
40461  __Pyx_memviewslice *memviewslice,
40462  int memview_is_new_reference)
40463 {
40464  __Pyx_RefNannyDeclarations
40465  int i, retval=-1;
40466  Py_buffer *buf = &memview->view;
40467  __Pyx_RefNannySetupContext("init_memviewslice", 0);
40468  if (!buf) {
40469  PyErr_SetString(PyExc_ValueError,
40470  "buf is NULL.");
40471  goto fail;
40472  } else if (memviewslice->memview || memviewslice->data) {
40473  PyErr_SetString(PyExc_ValueError,
40474  "memviewslice is already initialized!");
40475  goto fail;
40476  }
40477  if (buf->strides) {
40478  for (i = 0; i < ndim; i++) {
40479  memviewslice->strides[i] = buf->strides[i];
40480  }
40481  } else {
40482  Py_ssize_t stride = buf->itemsize;
40483  for (i = ndim - 1; i >= 0; i--) {
40484  memviewslice->strides[i] = stride;
40485  stride *= buf->shape[i];
40486  }
40487  }
40488  for (i = 0; i < ndim; i++) {
40489  memviewslice->shape[i] = buf->shape[i];
40490  if (buf->suboffsets) {
40491  memviewslice->suboffsets[i] = buf->suboffsets[i];
40492  } else {
40493  memviewslice->suboffsets[i] = -1;
40494  }
40495  }
40496  memviewslice->memview = memview;
40497  memviewslice->data = (char *)buf->buf;
40498  if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) {
40499  Py_INCREF(memview);
40500  }
40501  retval = 0;
40502  goto no_fail;
40503 fail:
40504  memviewslice->memview = 0;
40505  memviewslice->data = 0;
40506  retval = -1;
40507 no_fail:
40508  __Pyx_RefNannyFinishContext();
40509  return retval;
40510 }
40511 #ifndef Py_NO_RETURN
40512 #define Py_NO_RETURN
40513 #endif
40514 static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN {
40515  va_list vargs;
40516  char msg[200];
40517 #ifdef HAVE_STDARG_PROTOTYPES
40518  va_start(vargs, fmt);
40519 #else
40520  va_start(vargs);
40521 #endif
40522  vsnprintf(msg, 200, fmt, vargs);
40523  va_end(vargs);
40524  Py_FatalError(msg);
40525 }
40526 static CYTHON_INLINE int
40527 __pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
40528  PyThread_type_lock lock)
40529 {
40530  int result;
40531  PyThread_acquire_lock(lock, 1);
40532  result = (*acquisition_count)++;
40533  PyThread_release_lock(lock);
40534  return result;
40535 }
40536 static CYTHON_INLINE int
40537 __pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count,
40538  PyThread_type_lock lock)
40539 {
40540  int result;
40541  PyThread_acquire_lock(lock, 1);
40542  result = (*acquisition_count)--;
40543  PyThread_release_lock(lock);
40544  return result;
40545 }
40546 static CYTHON_INLINE void
40547 __Pyx_INC_MEMVIEW(__Pyx_memviewslice *memslice, int have_gil, int lineno)
40548 {
40549  int first_time;
40550  struct __pyx_memoryview_obj *memview = memslice->memview;
40551  if (!memview || (PyObject *) memview == Py_None)
40552  return;
40553  if (__pyx_get_slice_count(memview) < 0)
40554  __pyx_fatalerror("Acquisition count is %d (line %d)",
40555  __pyx_get_slice_count(memview), lineno);
40556  first_time = __pyx_add_acquisition_count(memview) == 0;
40557  if (first_time) {
40558  if (have_gil) {
40559  Py_INCREF((PyObject *) memview);
40560  } else {
40561  PyGILState_STATE _gilstate = PyGILState_Ensure();
40562  Py_INCREF((PyObject *) memview);
40563  PyGILState_Release(_gilstate);
40564  }
40565  }
40566 }
40567 static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW(__Pyx_memviewslice *memslice,
40568  int have_gil, int lineno) {
40569  int last_time;
40570  struct __pyx_memoryview_obj *memview = memslice->memview;
40571  if (!memview ) {
40572  return;
40573  } else if ((PyObject *) memview == Py_None) {
40574  memslice->memview = NULL;
40575  return;
40576  }
40577  if (__pyx_get_slice_count(memview) <= 0)
40578  __pyx_fatalerror("Acquisition count is %d (line %d)",
40579  __pyx_get_slice_count(memview), lineno);
40580  last_time = __pyx_sub_acquisition_count(memview) == 1;
40581  memslice->data = NULL;
40582  if (last_time) {
40583  if (have_gil) {
40584  Py_CLEAR(memslice->memview);
40585  } else {
40586  PyGILState_STATE _gilstate = PyGILState_Ensure();
40587  Py_CLEAR(memslice->memview);
40588  PyGILState_Release(_gilstate);
40589  }
40590  } else {
40591  memslice->memview = NULL;
40592  }
40593 }
40594 
40595 /* CIntFromPy */
40596 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
40597  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
40598  const int is_unsigned = neg_one > const_zero;
40599 #if PY_MAJOR_VERSION < 3
40600  if (likely(PyInt_Check(x))) {
40601  if (sizeof(long) < sizeof(long)) {
40602  __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
40603  } else {
40604  long val = PyInt_AS_LONG(x);
40605  if (is_unsigned && unlikely(val < 0)) {
40606  goto raise_neg_overflow;
40607  }
40608  return (long) val;
40609  }
40610  } else
40611 #endif
40612  if (likely(PyLong_Check(x))) {
40613  if (is_unsigned) {
40614 #if CYTHON_USE_PYLONG_INTERNALS
40615  const digit* digits = ((PyLongObject*)x)->ob_digit;
40616  switch (Py_SIZE(x)) {
40617  case 0: return (long) 0;
40618  case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
40619  case 2:
40620  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
40621  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40622  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40623  } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
40624  return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
40625  }
40626  }
40627  break;
40628  case 3:
40629  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
40630  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40631  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40632  } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
40633  return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
40634  }
40635  }
40636  break;
40637  case 4:
40638  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
40639  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40640  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40641  } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
40642  return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
40643  }
40644  }
40645  break;
40646  }
40647 #endif
40648 #if CYTHON_COMPILING_IN_CPYTHON
40649  if (unlikely(Py_SIZE(x) < 0)) {
40650  goto raise_neg_overflow;
40651  }
40652 #else
40653  {
40654  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
40655  if (unlikely(result < 0))
40656  return (long) -1;
40657  if (unlikely(result == 1))
40658  goto raise_neg_overflow;
40659  }
40660 #endif
40661  if (sizeof(long) <= sizeof(unsigned long)) {
40662  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
40663 #ifdef HAVE_LONG_LONG
40664  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
40665  __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
40666 #endif
40667  }
40668  } else {
40669 #if CYTHON_USE_PYLONG_INTERNALS
40670  const digit* digits = ((PyLongObject*)x)->ob_digit;
40671  switch (Py_SIZE(x)) {
40672  case 0: return (long) 0;
40673  case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
40674  case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
40675  case -2:
40676  if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
40677  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40678  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40679  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
40680  return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40681  }
40682  }
40683  break;
40684  case 2:
40685  if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
40686  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40687  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40688  } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
40689  return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40690  }
40691  }
40692  break;
40693  case -3:
40694  if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
40695  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40696  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40697  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
40698  return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40699  }
40700  }
40701  break;
40702  case 3:
40703  if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
40704  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40705  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40706  } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
40707  return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40708  }
40709  }
40710  break;
40711  case -4:
40712  if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
40713  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40714  __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40715  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
40716  return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40717  }
40718  }
40719  break;
40720  case 4:
40721  if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
40722  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40723  __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40724  } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
40725  return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
40726  }
40727  }
40728  break;
40729  }
40730 #endif
40731  if (sizeof(long) <= sizeof(long)) {
40732  __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
40733 #ifdef HAVE_LONG_LONG
40734  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
40735  __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
40736 #endif
40737  }
40738  }
40739  {
40740 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
40741  PyErr_SetString(PyExc_RuntimeError,
40742  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
40743 #else
40744  long val;
40745  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
40746  #if PY_MAJOR_VERSION < 3
40747  if (likely(v) && !PyLong_Check(v)) {
40748  PyObject *tmp = v;
40749  v = PyNumber_Long(tmp);
40750  Py_DECREF(tmp);
40751  }
40752  #endif
40753  if (likely(v)) {
40754  int one = 1; int is_little = (int)*(unsigned char *)&one;
40755  unsigned char *bytes = (unsigned char *)&val;
40756  int ret = _PyLong_AsByteArray((PyLongObject *)v,
40757  bytes, sizeof(val),
40758  is_little, !is_unsigned);
40759  Py_DECREF(v);
40760  if (likely(!ret))
40761  return val;
40762  }
40763 #endif
40764  return (long) -1;
40765  }
40766  } else {
40767  long val;
40768  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
40769  if (!tmp) return (long) -1;
40770  val = __Pyx_PyInt_As_long(tmp);
40771  Py_DECREF(tmp);
40772  return val;
40773  }
40774 raise_overflow:
40775  PyErr_SetString(PyExc_OverflowError,
40776  "value too large to convert to long");
40777  return (long) -1;
40778 raise_neg_overflow:
40779  PyErr_SetString(PyExc_OverflowError,
40780  "can't convert negative value to long");
40781  return (long) -1;
40782 }
40783 
40784 /* CIntToPy */
40785 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
40786  const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0;
40787  const int is_unsigned = neg_one > const_zero;
40788  if (is_unsigned) {
40789  if (sizeof(long) < sizeof(long)) {
40790  return PyInt_FromLong((long) value);
40791  } else if (sizeof(long) <= sizeof(unsigned long)) {
40792  return PyLong_FromUnsignedLong((unsigned long) value);
40793 #ifdef HAVE_LONG_LONG
40794  } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
40795  return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
40796 #endif
40797  }
40798  } else {
40799  if (sizeof(long) <= sizeof(long)) {
40800  return PyInt_FromLong((long) value);
40801 #ifdef HAVE_LONG_LONG
40802  } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
40803  return PyLong_FromLongLong((PY_LONG_LONG) value);
40804 #endif
40805  }
40806  }
40807  {
40808  int one = 1; int little = (int)*(unsigned char *)&one;
40809  unsigned char *bytes = (unsigned char *)&value;
40810  return _PyLong_FromByteArray(bytes, sizeof(long),
40811  little, !is_unsigned);
40812  }
40813 }
40814 
40815 /* CIntFromPy */
40816 static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
40817  const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0;
40818  const int is_unsigned = neg_one > const_zero;
40819 #if PY_MAJOR_VERSION < 3
40820  if (likely(PyInt_Check(x))) {
40821  if (sizeof(char) < sizeof(long)) {
40822  __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
40823  } else {
40824  long val = PyInt_AS_LONG(x);
40825  if (is_unsigned && unlikely(val < 0)) {
40826  goto raise_neg_overflow;
40827  }
40828  return (char) val;
40829  }
40830  } else
40831 #endif
40832  if (likely(PyLong_Check(x))) {
40833  if (is_unsigned) {
40834 #if CYTHON_USE_PYLONG_INTERNALS
40835  const digit* digits = ((PyLongObject*)x)->ob_digit;
40836  switch (Py_SIZE(x)) {
40837  case 0: return (char) 0;
40838  case 1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
40839  case 2:
40840  if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
40841  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40842  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40843  } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
40844  return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
40845  }
40846  }
40847  break;
40848  case 3:
40849  if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
40850  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40851  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40852  } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
40853  return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
40854  }
40855  }
40856  break;
40857  case 4:
40858  if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
40859  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40860  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40861  } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
40862  return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
40863  }
40864  }
40865  break;
40866  }
40867 #endif
40868 #if CYTHON_COMPILING_IN_CPYTHON
40869  if (unlikely(Py_SIZE(x) < 0)) {
40870  goto raise_neg_overflow;
40871  }
40872 #else
40873  {
40874  int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
40875  if (unlikely(result < 0))
40876  return (char) -1;
40877  if (unlikely(result == 1))
40878  goto raise_neg_overflow;
40879  }
40880 #endif
40881  if (sizeof(char) <= sizeof(unsigned long)) {
40882  __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
40883 #ifdef HAVE_LONG_LONG
40884  } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
40885  __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
40886 #endif
40887  }
40888  } else {
40889 #if CYTHON_USE_PYLONG_INTERNALS
40890  const digit* digits = ((PyLongObject*)x)->ob_digit;
40891  switch (Py_SIZE(x)) {
40892  case 0: return (char) 0;
40893  case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, (sdigit) (-(sdigit)digits[0]))
40894  case 1: __PYX_VERIFY_RETURN_INT(char, digit, +digits[0])
40895  case -2:
40896  if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
40897  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40898  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40899  } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
40900  return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40901  }
40902  }
40903  break;
40904  case 2:
40905  if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
40906  if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
40907  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40908  } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
40909  return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40910  }
40911  }
40912  break;
40913  case -3:
40914  if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
40915  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40916  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40917  } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
40918  return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40919  }
40920  }
40921  break;
40922  case 3:
40923  if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
40924  if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
40925  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40926  } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
40927  return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40928  }
40929  }
40930  break;
40931  case -4:
40932  if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
40933  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40934  __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40935  } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
40936  return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40937  }
40938  }
40939  break;
40940  case 4:
40941  if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
40942  if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
40943  __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
40944  } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
40945  return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
40946  }
40947  }
40948  break;
40949  }
40950 #endif
40951  if (sizeof(char) <= sizeof(long)) {
40952  __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
40953 #ifdef HAVE_LONG_LONG
40954  } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
40955  __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
40956 #endif
40957  }
40958  }
40959  {
40960 #if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
40961  PyErr_SetString(PyExc_RuntimeError,
40962  "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
40963 #else
40964  char val;
40965  PyObject *v = __Pyx_PyNumber_IntOrLong(x);
40966  #if PY_MAJOR_VERSION < 3
40967  if (likely(v) && !PyLong_Check(v)) {
40968  PyObject *tmp = v;
40969  v = PyNumber_Long(tmp);
40970  Py_DECREF(tmp);
40971  }
40972  #endif
40973  if (likely(v)) {
40974  int one = 1; int is_little = (int)*(unsigned char *)&one;
40975  unsigned char *bytes = (unsigned char *)&val;
40976  int ret = _PyLong_AsByteArray((PyLongObject *)v,
40977  bytes, sizeof(val),
40978  is_little, !is_unsigned);
40979  Py_DECREF(v);
40980  if (likely(!ret))
40981  return val;
40982  }
40983 #endif
40984  return (char) -1;
40985  }
40986  } else {
40987  char val;
40988  PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
40989  if (!tmp) return (char) -1;
40990  val = __Pyx_PyInt_As_char(tmp);
40991  Py_DECREF(tmp);
40992  return val;
40993  }
40994 raise_overflow:
40995  PyErr_SetString(PyExc_OverflowError,
40996  "value too large to convert to char");
40997  return (char) -1;
40998 raise_neg_overflow:
40999  PyErr_SetString(PyExc_OverflowError,
41000  "can't convert negative value to char");
41001  return (char) -1;
41002 }
41003 
41004 /* CheckBinaryVersion */
41005 static int __Pyx_check_binary_version(void) {
41006  char ctversion[4], rtversion[4];
41007  PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
41008  PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
41009  if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
41010  char message[200];
41011  PyOS_snprintf(message, sizeof(message),
41012  "compiletime version %s of module '%.100s' "
41013  "does not match runtime version %s",
41014  ctversion, __Pyx_MODULE_NAME, rtversion);
41015  return PyErr_WarnEx(NULL, message, 1);
41016  }
41017  return 0;
41018 }
41019 
41020 /* InitStrings */
41021 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
41022  while (t->p) {
41023  #if PY_MAJOR_VERSION < 3
41024  if (t->is_unicode) {
41025  *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
41026  } else if (t->intern) {
41027  *t->p = PyString_InternFromString(t->s);
41028  } else {
41029  *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
41030  }
41031  #else
41032  if (t->is_unicode | t->is_str) {
41033  if (t->intern) {
41034  *t->p = PyUnicode_InternFromString(t->s);
41035  } else if (t->encoding) {
41036  *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
41037  } else {
41038  *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
41039  }
41040  } else {
41041  *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
41042  }
41043  #endif
41044  if (!*t->p)
41045  return -1;
41046  if (PyObject_Hash(*t->p) == -1)
41047  return -1;
41048  ++t;
41049  }
41050  return 0;
41051 }
41052 
41053 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
41054  return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
41055 }
41056 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
41057  Py_ssize_t ignore;
41058  return __Pyx_PyObject_AsStringAndSize(o, &ignore);
41059 }
41060 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
41061 #if !CYTHON_PEP393_ENABLED
41062 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
41063  char* defenc_c;
41064  PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
41065  if (!defenc) return NULL;
41066  defenc_c = PyBytes_AS_STRING(defenc);
41067 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
41068  {
41069  char* end = defenc_c + PyBytes_GET_SIZE(defenc);
41070  char* c;
41071  for (c = defenc_c; c < end; c++) {
41072  if ((unsigned char) (*c) >= 128) {
41073  PyUnicode_AsASCIIString(o);
41074  return NULL;
41075  }
41076  }
41077  }
41078 #endif
41079  *length = PyBytes_GET_SIZE(defenc);
41080  return defenc_c;
41081 }
41082 #else
41083 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
41084  if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
41085 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
41086  if (likely(PyUnicode_IS_ASCII(o))) {
41087  *length = PyUnicode_GET_LENGTH(o);
41088  return PyUnicode_AsUTF8(o);
41089  } else {
41090  PyUnicode_AsASCIIString(o);
41091  return NULL;
41092  }
41093 #else
41094  return PyUnicode_AsUTF8AndSize(o, length);
41095 #endif
41096 }
41097 #endif
41098 #endif
41099 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
41100 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
41101  if (
41102 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
41103  __Pyx_sys_getdefaultencoding_not_ascii &&
41104 #endif
41105  PyUnicode_Check(o)) {
41106  return __Pyx_PyUnicode_AsStringAndSize(o, length);
41107  } else
41108 #endif
41109 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
41110  if (PyByteArray_Check(o)) {
41111  *length = PyByteArray_GET_SIZE(o);
41112  return PyByteArray_AS_STRING(o);
41113  } else
41114 #endif
41115  {
41116  char* result;
41117  int r = PyBytes_AsStringAndSize(o, &result, length);
41118  if (unlikely(r < 0)) {
41119  return NULL;
41120  } else {
41121  return result;
41122  }
41123  }
41124 }
41125 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
41126  int is_true = x == Py_True;
41127  if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
41128  else return PyObject_IsTrue(x);
41129 }
41130 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
41131  int retval;
41132  if (unlikely(!x)) return -1;
41133  retval = __Pyx_PyObject_IsTrue(x);
41134  Py_DECREF(x);
41135  return retval;
41136 }
41137 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
41138 #if PY_MAJOR_VERSION >= 3
41139  if (PyLong_Check(result)) {
41140  if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
41141  "__int__ returned non-int (type %.200s). "
41142  "The ability to return an instance of a strict subclass of int "
41143  "is deprecated, and may be removed in a future version of Python.",
41144  Py_TYPE(result)->tp_name)) {
41145  Py_DECREF(result);
41146  return NULL;
41147  }
41148  return result;
41149  }
41150 #endif
41151  PyErr_Format(PyExc_TypeError,
41152  "__%.4s__ returned non-%.4s (type %.200s)",
41153  type_name, type_name, Py_TYPE(result)->tp_name);
41154  Py_DECREF(result);
41155  return NULL;
41156 }
41157 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
41158 #if CYTHON_USE_TYPE_SLOTS
41159  PyNumberMethods *m;
41160 #endif
41161  const char *name = NULL;
41162  PyObject *res = NULL;
41163 #if PY_MAJOR_VERSION < 3
41164  if (likely(PyInt_Check(x) || PyLong_Check(x)))
41165 #else
41166  if (likely(PyLong_Check(x)))
41167 #endif
41168  return __Pyx_NewRef(x);
41169 #if CYTHON_USE_TYPE_SLOTS
41170  m = Py_TYPE(x)->tp_as_number;
41171  #if PY_MAJOR_VERSION < 3
41172  if (m && m->nb_int) {
41173  name = "int";
41174  res = m->nb_int(x);
41175  }
41176  else if (m && m->nb_long) {
41177  name = "long";
41178  res = m->nb_long(x);
41179  }
41180  #else
41181  if (likely(m && m->nb_int)) {
41182  name = "int";
41183  res = m->nb_int(x);
41184  }
41185  #endif
41186 #else
41187  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
41188  res = PyNumber_Int(x);
41189  }
41190 #endif
41191  if (likely(res)) {
41192 #if PY_MAJOR_VERSION < 3
41193  if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
41194 #else
41195  if (unlikely(!PyLong_CheckExact(res))) {
41196 #endif
41197  return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
41198  }
41199  }
41200  else if (!PyErr_Occurred()) {
41201  PyErr_SetString(PyExc_TypeError,
41202  "an integer is required");
41203  }
41204  return res;
41205 }
41206 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
41207  Py_ssize_t ival;
41208  PyObject *x;
41209 #if PY_MAJOR_VERSION < 3
41210  if (likely(PyInt_CheckExact(b))) {
41211  if (sizeof(Py_ssize_t) >= sizeof(long))
41212  return PyInt_AS_LONG(b);
41213  else
41214  return PyInt_AsSsize_t(b);
41215  }
41216 #endif
41217  if (likely(PyLong_CheckExact(b))) {
41218  #if CYTHON_USE_PYLONG_INTERNALS
41219  const digit* digits = ((PyLongObject*)b)->ob_digit;
41220  const Py_ssize_t size = Py_SIZE(b);
41221  if (likely(__Pyx_sst_abs(size) <= 1)) {
41222  ival = likely(size) ? digits[0] : 0;
41223  if (size == -1) ival = -ival;
41224  return ival;
41225  } else {
41226  switch (size) {
41227  case 2:
41228  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
41229  return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
41230  }
41231  break;
41232  case -2:
41233  if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
41234  return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
41235  }
41236  break;
41237  case 3:
41238  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
41239  return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
41240  }
41241  break;
41242  case -3:
41243  if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
41244  return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
41245  }
41246  break;
41247  case 4:
41248  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
41249  return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
41250  }
41251  break;
41252  case -4:
41253  if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
41254  return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
41255  }
41256  break;
41257  }
41258  }
41259  #endif
41260  return PyLong_AsSsize_t(b);
41261  }
41262  x = PyNumber_Index(b);
41263  if (!x) return -1;
41264  ival = PyInt_AsSsize_t(x);
41265  Py_DECREF(x);
41266  return ival;
41267 }
41268 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
41269  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
41270 }
41271 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
41272  return PyInt_FromSize_t(ival);
41273 }
41274 
41275 
41276 #endif /* Py_PYTHON_H */
readTriangleElementBoundaryMaterialTypes
int readTriangleElementBoundaryMaterialTypes(Mesh &mesh, const char *filebase, int triangleIndexBase)
Definition: mesh.cpp:5007
Mesh::nodeDiametersArray
double * nodeDiametersArray
Definition: mesh.h:69
regularHexahedralMeshElements
int regularHexahedralMeshElements(const int &nx, const int &ny, const int &nz, const int &px, const int &py, const int &pz, Mesh &mesh)
Definition: mesh.cpp:431
computeGeometricInfo_edge
int computeGeometricInfo_edge(Mesh &mesh)
Definition: mesh.cpp:3872
Mesh::interiorElementBoundariesArray
int * interiorElementBoundariesArray
Definition: mesh.h:50
Mesh::elementBoundaryNodesArray
int * elementBoundaryNodesArray
Definition: mesh.h:47
write3dmMesh
int write3dmMesh(Mesh &mesh, const char *filebase, int adhIndexBase)
Definition: mesh.cpp:5717
MultilevelMesh
Definition: mesh.h:257
readBC
int readBC(Mesh &mesh, const char *filebase, int indexBase)
Definition: mesh.cpp:5679
Mesh::nodeArray
double * nodeArray
Definition: mesh.h:67
regularRectangularToTriangularElementBoundaryMaterials
int regularRectangularToTriangularElementBoundaryMaterials(const double &Lx, const double &Ly, Mesh &mesh)
Definition: mesh.cpp:141
Mesh::nodeElementsArray
int * nodeElementsArray
Definition: mesh.h:43
Mesh::max_nElements_node
int max_nElements_node
Definition: mesh.h:38
Mesh::pz
int pz
Definition: mesh.h:64
regularMeshNodes2D
int regularMeshNodes2D(const int &nx, const int &ny, const double &Lx, const double &Ly, Mesh &mesh)
Definition: mesh.cpp:380
constructElementBoundaryElementsArray_triangle
int constructElementBoundaryElementsArray_triangle(Mesh &mesh)
Definition: mesh.cpp:740
locallyRefineEdgeMesh
int locallyRefineEdgeMesh(MultilevelMesh &multilevelMesh, int *elementTagArray)
Definition: mesh.cpp:5801
Mesh::nodeElementOffsets
int * nodeElementOffsets
Definition: mesh.h:44
Mesh
Definition: mesh.h:27
Mesh::nEdges_global
int nEdges_global
Definition: mesh.h:39
Mesh::exteriorElementBoundariesArray
int * exteriorElementBoundariesArray
Definition: mesh.h:51
f
Double f
Definition: Headers.h:64
locallyRefineTriangleMesh_4T
int locallyRefineTriangleMesh_4T(MultilevelMesh &multilevelMesh, int *elementTagArray)
Definition: mesh.cpp:6669
regularHexahedralToTetrahedralElementBoundaryMaterials
int regularHexahedralToTetrahedralElementBoundaryMaterials(const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
Definition: mesh.cpp:234
s
Double s
Definition: Headers.h:84
Mesh::nodeStarOffsets
int * nodeStarOffsets
Definition: mesh.h:54
allocateGeometricInfo_hexahedron
int allocateGeometricInfo_hexahedron(Mesh &mesh)
Definition: mesh.cpp:3585
Mesh::volume
double volume
Definition: mesh.h:70
Mesh::nNodes_elementBoundary
int nNodes_elementBoundary
Definition: mesh.h:33
setNewestNodeBasesToLongestEdge
int setNewestNodeBasesToLongestEdge(MultilevelMesh &multilevelMesh)
Definition: mesh.cpp:6130
Mesh::nElementBoundaries_global
int nElementBoundaries_global
Definition: mesh.h:35
allocateNodeAndElementNodeDataStructures
int allocateNodeAndElementNodeDataStructures(Mesh &mesh, int nElements_global, int nNodes_global, int nNodes_element)
Definition: mesh.cpp:3941
Mesh::hMin
double hMin
Definition: mesh.h:70
L
Double L
Definition: Headers.h:72
n
Int n
Definition: Headers.h:28
q
Double q
Definition: Headers.h:81
locallyRefineTriangleMesh
int locallyRefineTriangleMesh(MultilevelMesh &multilevelMesh, int *elementTagArray)
Definition: mesh.cpp:5951
computeGeometricInfo_quadrilateral
int computeGeometricInfo_quadrilateral(Mesh &mesh)
Definition: mesh.cpp:3800
Mesh::nInteriorElementBoundaries_global
int nInteriorElementBoundaries_global
Definition: mesh.h:36
Mesh::ny
int ny
Definition: mesh.h:63
Mesh::nodeStarArray
int * nodeStarArray
Definition: mesh.h:53
assignElementBoundaryMaterialTypesFromParent
int assignElementBoundaryMaterialTypesFromParent(Mesh &parentMesh, Mesh &childMesh, const int *levelElementParentsArray, const int &nSpace_global)
Definition: mesh.cpp:4504
Mesh::h
double h
Definition: mesh.h:70
allocateGeometricInfo_NURBS
int allocateGeometricInfo_NURBS(Mesh &mesh)
Definition: mesh.cpp:3677
globallyRefineQuadrilateralMesh
int globallyRefineQuadrilateralMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags)
Definition: mesh.cpp:4181
regularHexahedralToTetrahedralMeshElements
int regularHexahedralToTetrahedralMeshElements(const int &nx, const int &ny, const int &nz, Mesh &mesh)
Definition: mesh.cpp:199
locallyRefineTriangleMesh_redGreen
int locallyRefineTriangleMesh_redGreen(MultilevelMesh &multilevelMesh, int *elementTagArray)
Definition: mesh.cpp:6158
MultilevelMesh::nLevels
int nLevels
Definition: mesh.h:259
readTetgenMesh
int readTetgenMesh(Mesh &mesh, const char *filebase, int tetgenIndexBase)
Definition: mesh.cpp:5065
globallyRefineHexahedralMesh
int globallyRefineHexahedralMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags)
Definition: mesh.cpp:4485
regularHexahedralMeshElementBoundaryMaterials
int regularHexahedralMeshElementBoundaryMaterials(const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
Definition: mesh.cpp:278
Mesh::nNodes_element
int nNodes_element
Definition: mesh.h:32
Mesh::elementBoundaryLocalElementBoundariesArray
int * elementBoundaryLocalElementBoundariesArray
Definition: mesh.h:49
U
Double U
Definition: Headers.h:88
v
Double v
Definition: Headers.h:95
Mesh::elementBoundaryMaterialTypes
int * elementBoundaryMaterialTypes
Definition: mesh.h:56
regularRectangularToTriangularMeshNodes
int regularRectangularToTriangularMeshNodes(const int &nx, const int &ny, const double &Lx, const double &Ly, Mesh &mesh)
Definition: mesh.cpp:168
Mesh::elementInnerDiametersArray
double * elementInnerDiametersArray
Definition: mesh.h:67
writeTriangleMesh
int writeTriangleMesh(Mesh &mesh, const char *filebase, int triangleIndexBase)
Definition: mesh.cpp:4977
globallyRefineEdgeMesh
int globallyRefineEdgeMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags)
Definition: mesh.cpp:3961
edgeMeshElements
int edgeMeshElements(const int &nx, Mesh &mesh)
Definition: mesh.cpp:59
regularQuadrilateralMeshElementBoundaryMaterials
int regularQuadrilateralMeshElementBoundaryMaterials(const double &Lx, const double &Ly, Mesh &mesh)
Definition: mesh.cpp:328
T
Double T
Definition: Headers.h:87
readTriangleMesh
int readTriangleMesh(Mesh &mesh, const char *filebase, int triangleIndexBase)
Definition: mesh.cpp:4917
regularQuadrilateralMeshElements
int regularQuadrilateralMeshElements(const int &nx, const int &ny, Mesh &mesh)
Definition: mesh.cpp:473
readTetgenElementBoundaryMaterialTypes
int readTetgenElementBoundaryMaterialTypes(Mesh &mesh, const char *filebase, int tetgenIndexBase)
Definition: mesh.cpp:5124
Mesh::V_KNOT
double * V_KNOT
Definition: mesh.h:62
computeGeometricInfo_tetrahedron
int computeGeometricInfo_tetrahedron(Mesh &mesh)
Definition: mesh.cpp:3483
constructElementBoundaryElementsArray_tetrahedron
int constructElementBoundaryElementsArray_tetrahedron(Mesh &mesh)
Definition: mesh.cpp:1078
z
Double * z
Definition: Headers.h:49
regularMeshNodes
int regularMeshNodes(const int &nx, const int &ny, const int &nz, const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
Definition: mesh.cpp:333
constructElementBoundaryElementsArray_quadrilateral
int constructElementBoundaryElementsArray_quadrilateral(Mesh &mesh)
Definition: mesh.cpp:909
Mesh::elementNodesArray
int * elementNodesArray
Definition: mesh.h:42
constructElementBoundaryElementsArray_edge
int constructElementBoundaryElementsArray_edge(Mesh &mesh)
Definition: mesh.cpp:582
u
Double u
Definition: Headers.h:89
Mesh::elementBoundaryBarycentersArray
double * elementBoundaryBarycentersArray
Definition: mesh.h:68
Mesh::py
int py
Definition: mesh.h:64
Mesh::nz
int nz
Definition: mesh.h:63
Mesh::elementBoundariesArray
int * elementBoundariesArray
Definition: mesh.h:46
Mesh::elementBarycentersArray
double * elementBarycentersArray
Definition: mesh.h:68
c
Double c
Definition: Headers.h:54
Mesh::nElements_global
int nElements_global
Definition: mesh.h:30
mesh.h
Mesh::nodeMaterialTypes
int * nodeMaterialTypes
Definition: mesh.h:57
regularEdgeMeshNodes
int regularEdgeMeshNodes(const int &nx, const double &Lx, Mesh &mesh)
Definition: mesh.cpp:73
computeGeometricInfo_triangle
int computeGeometricInfo_triangle(Mesh &mesh)
Definition: mesh.cpp:3702
Mesh::nElementBoundaries_element
int nElementBoundaries_element
Definition: mesh.h:34
Mesh::elementMaterialTypes
int * elementMaterialTypes
Definition: mesh.h:55
Mesh::elementDiametersArray
double * elementDiametersArray
Definition: mesh.h:67
allocateGeometricInfo_edge
int allocateGeometricInfo_edge(Mesh &mesh)
Definition: mesh.cpp:3860
computeGeometricInfo_hexahedron
int computeGeometricInfo_hexahedron(Mesh &mesh)
Definition: mesh.cpp:3597
initializeMesh
void initializeMesh(Mesh &mesh)
Definition: mesh.h:87
Mesh::nNodes_global
int nNodes_global
Definition: mesh.h:31
writeTetgenMesh
int writeTetgenMesh(Mesh &mesh, const char *filebase, int tetgenIndexBase)
Definition: mesh.cpp:5402
read3DM
int read3DM(Mesh &mesh, const char *filebase, int indexBase)
Definition: mesh.cpp:5437
Mesh::nExteriorElementBoundaries_global
int nExteriorElementBoundaries_global
Definition: mesh.h:37
Mesh::px
int px
Definition: mesh.h:64
regularHexahedralToTetrahedralMeshNodes
int regularHexahedralToTetrahedralMeshNodes(const int &nx, const int &ny, const int &nz, const double &Lx, const double &Ly, const double &Lz, Mesh &mesh)
Definition: mesh.cpp:418
Mesh::W_KNOT
double * W_KNOT
Definition: mesh.h:62
Mesh::elementIJK
int * elementIJK
Definition: mesh.h:60
constructElementBoundaryElementsArray_hexahedron
int constructElementBoundaryElementsArray_hexahedron(Mesh &mesh)
Definition: mesh.cpp:1253
Mesh::max_nNodeNeighbors_node
int max_nNodeNeighbors_node
Definition: mesh.h:40
globallyRefineTetrahedralMesh
int globallyRefineTetrahedralMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags)
Definition: mesh.cpp:4200
Mesh::sigmaMax
double sigmaMax
Definition: mesh.h:70
write2dmMesh
int write2dmMesh(Mesh &mesh, const char *filebase, int adhIndexBase)
Definition: mesh.cpp:5737
Mesh::nodeSupportArray
double * nodeSupportArray
Definition: mesh.h:69
r
Double r
Definition: Headers.h:83
read2DM
int read2DM(Mesh &mesh, const char *filebase, int indexBase)
Definition: mesh.cpp:5521
globallyRefineTriangularMesh
int globallyRefineTriangularMesh(const int &nLevels, Mesh &mesh, MultilevelMesh &multilevelMesh, bool averageNewNodeFlags)
Definition: mesh.cpp:4056
Mesh::weights
double * weights
Definition: mesh.h:61
regularRectangularToTriangularMeshElements
int regularRectangularToTriangularMeshElements(const int &nx, const int &ny, Mesh &mesh, int triangleFlag)
Definition: mesh.cpp:88
allocateGeometricInfo_triangle
int allocateGeometricInfo_triangle(Mesh &mesh)
Definition: mesh.cpp:3690
pos
double pos(double a)
Definition: testFMMandFSW.cpp:8
Mesh::edgeNodesArray
int * edgeNodesArray
Definition: mesh.h:52
Mesh::nx
int nx
Definition: mesh.h:63
Mesh::elementBoundaryDiametersArray
double * elementBoundaryDiametersArray
Definition: mesh.h:67
readHex
int readHex(Mesh &mesh, const char *filebase, int indexBase)
Definition: mesh.cpp:5604
allocateGeometricInfo_quadrilateral
int allocateGeometricInfo_quadrilateral(Mesh &mesh)
Definition: mesh.cpp:3790
Mesh::elementBoundaryElementsArray
int * elementBoundaryElementsArray
Definition: mesh.h:48
Mesh::elementNeighborsArray
int * elementNeighborsArray
Definition: mesh.h:45
computeGeometricInfo_NURBS
int computeGeometricInfo_NURBS(Mesh &mesh)
Definition: mesh.cpp:3683
Mesh::U_KNOT
double * U_KNOT
Definition: mesh.h:62
allocateGeometricInfo_tetrahedron
int allocateGeometricInfo_tetrahedron(Mesh &mesh)
Definition: mesh.cpp:3471